[Spread-cvs] cvs commit: spread/daemon net_types.h network.c protocol.c
jonathan at spread.org
jonathan at spread.org
Sat Sep 21 22:25:09 EDT 2002
jonathan 02/09/22 02:25:09
Modified: daemon net_types.h network.c protocol.c
Log:
Proposed fix for hanging bug where token rotates but aru on token never raises
so system is stuck. Added aru_last_id field to token to track who
last process to update teh aru was, that process is always allowed to
update the aru the next time around.
Revision Changes Path
1.3 +1 -0 spread/daemon/net_types.h
Index: net_types.h
===================================================================
RCS file: /storage/cvsroot/spread/daemon/net_types.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- net_types.h 31 Aug 2001 03:06:49 -0000 1.2
+++ net_types.h 22 Sep 2002 02:25:08 -0000 1.3
@@ -120,6 +120,7 @@
int32 seq;
int32 proc_id;
int32 aru;
+ int32 aru_last_id;
int16 flow_control;
int16 rtr_len;
} token_header;
1.7 +1 -0 spread/daemon/network.c
Index: network.c
===================================================================
RCS file: /storage/cvsroot/spread/daemon/network.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- network.c 16 Nov 2001 13:53:39 -0000 1.6
+++ network.c 22 Sep 2002 02:25:08 -0000 1.7
@@ -699,6 +699,7 @@
token_ptr->seq = Flip_int32( token_ptr->seq );
token_ptr->proc_id = Flip_int32( token_ptr->proc_id );
token_ptr->aru = Flip_int32( token_ptr->aru );
+ token_ptr->aru_last_id = Flip_int32( token_ptr->aru_last_id );
token_ptr->flow_control = Flip_int16( token_ptr->flow_control );
token_ptr->rtr_len = Flip_int16( token_ptr->rtr_len );
}
1.4 +3 -0 spread/daemon/protocol.c
Index: protocol.c
===================================================================
RCS file: /storage/cvsroot/spread/daemon/protocol.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- protocol.c 16 Oct 2001 15:58:42 -0000 1.3
+++ protocol.c 22 Sep 2002 02:25:08 -0000 1.4
@@ -560,13 +560,16 @@
/* Calculating Token->aru and Set_aru */
if( ( Token->aru == Set_aru ) ||
+ ( Token->aru_last_id == My.id ) ||
( Token->aru == Token->seq ) )
{
Token->aru = My_aru;
+ Token->aru_last_id = My.id;
if( My_aru < Highest_seq ) Set_aru = My_aru;
else Set_aru = -1;
}else if( Token->aru > My_aru ) {
Token->aru = My_aru;
+ Token->aru_last_id = My.id;
Set_aru = My_aru;
}else{
Set_aru = -1;
More information about the Spread-cvs
mailing list