[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10178: backport r10157 (in tor/branches/tor-0_1_2-patches: . src/or)



Author: arma
Date: 2007-05-12 20:53:13 -0400 (Sat, 12 May 2007)
New Revision: 10178

Modified:
   tor/branches/tor-0_1_2-patches/ChangeLog
   tor/branches/tor-0_1_2-patches/src/or/routerlist.c
Log:
backport r10157


Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-13 00:46:50 UTC (rev 10177)
+++ tor/branches/tor-0_1_2-patches/ChangeLog	2007-05-13 00:53:13 UTC (rev 10178)
@@ -19,6 +19,9 @@
   o Minor bugfixes:
     - Actually set the purpose correctly for descriptors inserted with
       purpose=controller.
+    - When we have k non-v2 authorities in our DirServer config,
+      we ignored as many as k v2 authorities while updating our
+      network-statuses.
 
   o Minor features:
     - When routers publish SVN revisions in their router descriptors,

Modified: tor/branches/tor-0_1_2-patches/src/or/routerlist.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-13 00:46:50 UTC (rev 10177)
+++ tor/branches/tor-0_1_2-patches/src/or/routerlist.c	2007-05-13 00:53:13 UTC (rev 10178)
@@ -2909,14 +2909,14 @@
   /* If no networkstatus was found, choose a dirserver at random as "most
    * recent". */
   if (most_recent_idx<0)
-    most_recent_idx = crypto_rand_int(n_dirservers);
+    most_recent_idx = crypto_rand_int(smartlist_len(trusted_dir_servers));
 
   if (fetch_latest) {
     int i;
     int n_failed = 0;
     for (i = most_recent_idx + 1; 1; ++i) {
       trusted_dir_server_t *ds;
-      if (i >= n_dirservers)
+      if (i >= smartlist_len(trusted_dir_servers))
         i = 0;
       ds = smartlist_get(trusted_dir_servers, i);
       if (! ds->is_v2_authority)