commit: r401 - trunk/daemon
[email protected] Mon, 13 Oct 2008 16:19:18 -0400
| Newsgroups | gmane.network.spread.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: jonathan Date: 2008-10-13 16:19:18 -0400 (Mon, 13 Oct 2008) New Revision: 401 Modified: trunk/daemon/Changelog trunk/daemon/groups.c trunk/daemon/session.c Log: Add G_shift_to_GOP function to capture all cases where groups membership completes. Also remove unneeded include of prot_body.h from session layer files. Modified: trunk/daemon/Changelog =================================================================== --- trunk/daemon/Changelog 2008-10-11 15:01:29 UTC (rev 400) +++ trunk/daemon/Changelog 2008-10-13 20:19:18 UTC (rev 401) @@ -1,3 +1,9 @@ +Mon Oct 13 16:16:45 2008 Jonathan Stanton <[email protected]> + + * session.c, groups.c (G_shift_to_GOP): Add G_shift_to_GOP function + to capture all cases where groups membership completes. Also remove + unneeded include of prot_body.h from session layer files. + Sat Oct 11 10:52:09 2008 Jonathan Stanton <[email protected]> * spread_params.h, protocol.c (Prot_handle_token): Trigger membership change if Modified: trunk/daemon/groups.c =================================================================== --- trunk/daemon/groups.c 2008-10-11 15:01:29 UTC (rev 400) +++ trunk/daemon/groups.c 2008-10-13 20:19:18 UTC (rev 401) @@ -40,7 +40,6 @@ #include "spread_params.h" #include "net_types.h" #include "protocol.h" -#include "prot_body.h" #include "sess_types.h" #include "sess_body.h" #include "groups.h" @@ -181,6 +180,8 @@ static int G_compare_memb_ids( const membership_id *mid1, const membership_id *mid2 ); +static void G_shift_to_GOP( void ); + static int G_compare_cstrptr(const void *a, const void *b) { return strcmp(*(const char**) a, *(const char**) b); @@ -236,6 +237,12 @@ return 0; } +static void G_shift_to_GOP( void ) +{ + Gstate = GOP; + GlobalStatus.gstate = Gstate; +} + void G_init() { int ret; @@ -292,8 +299,7 @@ Gathered.complete = 0; Gathered.next = NULL; - Gstate = GOP; - GlobalStatus.gstate = Gstate; + G_shift_to_GOP(); } void G_handle_reg_memb( configuration reg_memb, membership_id reg_memb_id ) @@ -379,8 +385,7 @@ } } - Gstate = GOP; - GlobalStatus.gstate = Gstate; + G_shift_to_GOP(); } else { /* @@ -1449,10 +1454,9 @@ if( Gstate == GGATHER ) { - Gstate = GOP; - GlobalStatus.gstate = Gstate; + G_shift_to_GOP(); }else{ - Gstate = GOP; + G_shift_to_GOP(); /* We do want to deliver a transitional signal to any * groups that are going to get a CAUSED_BY_NETWORK * after our Reg_memb is delivered. */ Modified: trunk/daemon/session.c =================================================================== --- trunk/daemon/session.c 2008-10-11 15:01:29 UTC (rev 400) +++ trunk/daemon/session.c 2008-10-13 20:19:18 UTC (rev 401) @@ -82,7 +82,6 @@ #include "status.h" #include "alarm.h" #include "objects.h" -#include "prot_body.h" #if ( SPREAD_PROTOCOL > 3 ) #include "queues.h" #endif