瀏覽代碼

r13317@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.


svn:r10537

Nick Mathewson 18 年之前
父節點
當前提交
2bb7005481
共有 2 個文件被更改,包括 14 次插入3 次删除
  1. 5 1
      ChangeLog
  2. 9 2
      src/or/routerlist.c

+ 5 - 1
ChangeLog

@@ -21,7 +21,11 @@ Changes in version 0.2.0.3-alpha - 2007-??-??
   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

+ 9 - 2
src/or/routerlist.c

@@ -3712,12 +3712,19 @@ compute_recommended_versions(time_t now, int client,
       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);