[or-cvs] Backport to 0.1.1: implement the "is this uptime change cos...

Nick Mathewson nickm at seul.org
Sun Jun 18 16:07:09 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv18952/src/or

Modified Files:
      Tag: tor-0_1_1-patches
	routerlist.c 
Log Message:
Backport to 0.1.1: implement the "is this uptime change cosmetic" test properly.

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.499.2.6
retrieving revision 1.499.2.7
diff -u -p -d -r1.499.2.6 -r1.499.2.7
--- routerlist.c	9 Jun 2006 06:51:51 -0000	1.499.2.6
+++ routerlist.c	18 Jun 2006 16:07:07 -0000	1.499.2.7
@@ -3775,7 +3775,7 @@ router_differences_are_cosmetic(routerin
    * give or take 30 minutes? */
   r1pub = r1->cache_info.published_on;
   r2pub = r2->cache_info.published_on;
-  if (abs(r2->uptime - (r1->uptime + (r2pub - r1pub))))
+  if (abs(r2->uptime - (r1->uptime + (r2pub - r1pub))) > 30*60)
     return 0;
 
   /* Otherwise, the difference is cosmetic. */



More information about the tor-commits mailing list