From b1cca07c9e556ca79743f2255ad18cc100e80ee0 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 24 Jul 2006 08:37:47 +0000 Subject: Fix a bug in CactusDefaultSyncGroupsByDirI() where the flesh ran into an infinite recursion if a driver didn't overload CCTK_SyncGroupsByDirI(). Thanks to Daniel Herbst and David Fiske for reporting this problem. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4352 17b73243-c579-4c4c-a9d2-2d5706c11dac --- src/comm/CactusDefaultComm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/comm') diff --git a/src/comm/CactusDefaultComm.c b/src/comm/CactusDefaultComm.c index ff0d96a4..b4b3741e 100644 --- a/src/comm/CactusDefaultComm.c +++ b/src/comm/CactusDefaultComm.c @@ -553,9 +553,10 @@ int CactusDefaultSyncGroupsByDirI (const cGH *GH, int num_groups, const int *directions) { int group, retval = 0; + char *groupname; static int user_has_been_notified = 0; - + /* individual directions aren't supported in the CCTK_SyncGroup* interface */ if (directions != NULL) { @@ -582,10 +583,12 @@ int CactusDefaultSyncGroupsByDirI (const cGH *GH, int num_groups, /* synchronise all groups one by one */ for (group = 0; group < num_groups; group++) { - if (CCTK_SyncGroupI (GH, groups[group]) == 0) + groupname = CCTK_GroupName (groups[group]); + if (CCTK_SyncGroup (GH, groupname) == 0) { retval++; } + free (groupname); } } -- cgit v1.2.3