[quake3-commits] r1898 - trunk/code/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 18 18:46:02 EST 2011


Author: tma
Date: 2011-02-18 18:46:02 -0500 (Fri, 18 Feb 2011)
New Revision: 1898

Modified:
   trunk/code/server/sv_main.c
Log:
* Fix Sys_Milliseconds wrapping causing the flood protection code to 
  malfunction and block all traffic (reported by bubu^)


Modified: trunk/code/server/sv_main.c
===================================================================
--- trunk/code/server/sv_main.c	2011-02-11 14:46:34 UTC (rev 1897)
+++ trunk/code/server/sv_main.c	2011-02-18 23:46:02 UTC (rev 1898)
@@ -444,7 +444,8 @@
 		interval = now - bucket->lastTime;
 
 		// Reclaim expired buckets
-		if ( bucket->lastTime > 0 && interval > ( burst * period ) ) {
+		if ( bucket->lastTime > 0 && ( interval > ( burst * period ) ||
+					interval < 0 ) ) {
 			if ( bucket->prev != NULL ) {
 				bucket->prev->next = bucket->next;
 			} else {



More information about the quake3-commits mailing list