[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10157: backport candidate: when we have k non-v2 authorities in our (tor/trunk/src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10157: backport candidate: when we have k non-v2 authorities in our (tor/trunk/src/or)
- From: arma@xxxxxxxx
- Date: Thu, 10 May 2007 06:01:56 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Thu, 10 May 2007 06:02:06 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-05-10 06:01:53 -0400 (Thu, 10 May 2007)
New Revision: 10157
Modified:
tor/trunk/src/or/routerlist.c
Log:
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...)
Modified: tor/trunk/src/or/routerlist.c
===================================================================
--- tor/trunk/src/or/routerlist.c 2007-05-10 09:34:34 UTC (rev 10156)
+++ tor/trunk/src/or/routerlist.c 2007-05-10 10:01:53 UTC (rev 10157)
@@ -3176,14 +3176,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->type & V2_AUTHORITY))