[or-cvs] r10537: bugfix: we were undercounting the number of authorities that (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Fri Jun 8 18:41:20 UTC 2007


Author: nickm
Date: 2007-06-08 14:41:19 -0400 (Fri, 08 Jun 2007)
New Revision: 10537

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/routerlist.c
Log:
 r13317 at catbus:  nickm | 2007-06-08 14:39:59 -0400
 bugfix: we were undercounting the number of authorities that recommended any given version by 1.  Backport candidate.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13317] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-06-08 18:41:16 UTC (rev 10536)
+++ tor/trunk/ChangeLog	2007-06-08 18:41:19 UTC (rev 10537)
@@ -21,9 +21,13 @@
   o Minor bugfixes (hidden services):
     - Stop tearing down the whole circuit when the user asks for a
       connection to a port that the hidden service didn't configure.
-      Resolves bug 444.
+      Resolves bug 444.  [Bugfix on 0.1.2.x]
 
+  o Minor bugfixes (versioning):
+    - Stop under-counting the number of authorities that recommend each
+      version. [Bugfix on 0.1.2.x]
 
+
 Changes in version 0.2.0.2-alpha - 2007-06-02
   o Major bugfixes on 0.2.0.1-alpha:
     - Fix an assertion failure related to servers without extra-info digests.

Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c	2007-06-08 18:41:16 UTC (rev 10536)
+++ tor/trunk/src/or/routerlist.c	2007-06-08 18:41:19 UTC (rev 10537)
@@ -3712,12 +3712,19 @@
       if (current && !strcmp(cp, current)) {
         ++n_seen;
       } else {
-        if (n_seen > n_versioning/2 && current)
+        if (current)
+          log_info(LD_DIR,"version %s is recommended by %d authorities",
+                    current, n_seen);
+        if (n_seen > n_versioning/2 && current) {
           smartlist_add(recommended, current);
-        n_seen = 0; /* XXXX020 shouldn't this be 1? */
+        }
+        n_seen = 1;
         current = cp;
       }
     });
+  if (current)
+    log_info(LD_DIR,"version %s is recommended by %d authorities",
+             current, n_seen);
   if (n_seen > n_versioning/2 && current)
     smartlist_add(recommended, current);
 



More information about the tor-commits mailing list