diff options
author | Roger Dingledine <arma@torproject.org> | 2007-05-10 10:01:53 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-05-10 10:01:53 +0000 |
commit | de11011b1b7d2ef2297e8fdb404d28780b84c6c3 (patch) | |
tree | 064f07f36e60269c4ed552df35c3574bd5419a4d | |
parent | 4e9a008e66567d5901625441c597fe38c3489b45 (diff) | |
download | tor-de11011b1b7d2ef2297e8fdb404d28780b84c6c3.tar.gz tor-de11011b1b7d2ef2297e8fdb404d28780b84c6c3.zip |
backport candidate: when we have k non-v2 authorities in our
dirservers lines, we ignored as many as k v2 authorities while
updating our network-statuses.
(not a problem right now since we have zero non-v2 authorities.
but if we ever change that...)
svn:r10157
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index c1e55ea481..5ce140528e 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3176,14 +3176,14 @@ update_networkstatus_client_downloads(time_t now) /* 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->type & V2_AUTHORITY)) |