[or-cvs] [tor/maint-0.2.2 4/8] Actually notice when our last entrynode goes down

nickm at torproject.org nickm at torproject.org
Wed Sep 29 04:33:54 UTC 2010


Author: Roger Dingledine <arma at torproject.org>
Date: Tue, 28 Sep 2010 21:59:31 -0400
Subject: Actually notice when our last entrynode goes down
Commit: 7de1caa33f025db5474dba5f7e256d28c5ab4969

Otherwise we'd never set have_minimum_dir_info to false, so the
"optimistic retry" would never trigger.
---
 src/or/circuitbuild.c |    4 ++--
 src/or/routerlist.c   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index a14ab6a..a9920e2 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -4605,7 +4605,7 @@ entries_retry_helper(or_options_t *options, int act)
         if (ri->is_running)
           any_running = 1; /* some entry is both known and running */
         else if (act) { /* mark it for retry */
-          ri->is_running = 1;
+          router_set_status(ri->cache_info.identity_digest, 1);
           e->can_retry = 1;
           e->bad_since = 0;
         }
@@ -4625,7 +4625,7 @@ entries_known_but_down(or_options_t *options)
   return entries_retry_helper(options, 0);
 }
 
-/** Mark all down known bridges up. */
+/** Mark all down known bridges / entrynodes up. */
 void
 entries_retry_all(or_options_t *options)
 {
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 1f542b1..a6ca03c 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4786,7 +4786,7 @@ update_router_have_minimum_dir_info(void)
     count_usable_descriptors(&num_present, &num_usable, consensus, options,
                              now, options->EntryNodes);
 
-    if (num_usable && (num_present == 0)) {
+    if (!num_usable || !num_present) {
       tor_snprintf(dir_info_status, sizeof(dir_info_status),
                    "We have only %d/%d usable entry node descriptors.",
                    num_present, num_usable);
-- 
1.7.1




More information about the tor-commits mailing list