From 0868a4004b33e4f03f4094faa19717a2047c744c Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Mon, 21 May 2007 12:35:33 +0000 Subject: [PATCH] backport r10187 svn:r10234 --- src/or/routerlist.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index bb2b7d4e0..f02feb76a 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -2517,9 +2517,6 @@ router_set_networkstatus(const char *s, time_t arrived_at, return 0; } - if (source != NS_FROM_CACHE && trusted_dir) - trusted_dir->n_networkstatus_failures = 0; - found = 0; for (i=0; i < smartlist_len(networkstatus_list); ++i) { networkstatus_t *old_ns = smartlist_get(networkstatus_list, i); @@ -2567,6 +2564,9 @@ router_set_networkstatus(const char *s, time_t arrived_at, } } + if (source != NS_FROM_CACHE && trusted_dir) + trusted_dir->n_networkstatus_failures = 0; + if (!found) smartlist_add(networkstatus_list, ns);