commit: r331 - trunk/daemon

[email protected]
Newsgroups gmane.network.spread.cvs
Message-ID <[email protected]>
Author: jonathan
Date: 2006-03-02 15:22:12 -0500 (Thu, 02 Mar 2006)
New Revision: 331

Modified:
   trunk/daemon/protocol.c
Log:
Fix for VERY old tokens being received. Fixes correctness problem with ordering which 
only triggers in lossy/delaying networks. 
Fix and patch by John and Yair



Modified: trunk/daemon/protocol.c
===================================================================
--- trunk/daemon/protocol.c	2006-03-02 19:03:45 UTC (rev 330)
+++ trunk/daemon/protocol.c	2006-03-02 20:22:12 UTC (rev 331)
@@ -495,6 +495,13 @@
 	   			Get_arq(Token->type), Get_retrans(Token->type) );
 		    }
 		    return;
+
+		} else if ( Get_arq(Token->type) != ( ( Get_arq( Last_token->type ) + 1 ) % 0x10 ) ) {
+		  Alarm( PROTOCOL, 
+			 "Prot_handle_token: not leader, swallowing very outdated token: ARQ(%d) RETRANS(%d) vs. Last ARQ(%d)\n",
+			 Get_arq(Token->type), Get_retrans(Token->type), Get_arq(Last_token->type) );
+		  return;
+
 		} else {
                         if ( Get_retrans(Token->type) > 0 ) {
                                 GlobalStatus.token_hurry++;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.