[or-cvs] [tor/master 1/2] log when we finish a circuit after being offline

nickm at torproject.org nickm at torproject.org
Wed Sep 22 05:52:06 UTC 2010


Author: Roger Dingledine <arma at torproject.org>
Date: Tue, 21 Sep 2010 02:16:43 -0400
Subject: log when we finish a circuit after being offline
Commit: fe42f10954bcc6a5f4529e544403432140a4acae

---
 changes/bug1362     |    5 +++++
 src/or/routerlist.c |    7 +++++++
 2 files changed, 12 insertions(+), 0 deletions(-)
 create mode 100644 changes/bug1362

diff --git a/changes/bug1362 b/changes/bug1362
new file mode 100644
index 0000000..e063937
--- /dev/null
+++ b/changes/bug1362
@@ -0,0 +1,5 @@
+  o Minor features:
+    - When we run out of directory information such that we can't build
+      circuits, but then get enough that we can build circuits, log when
+      we actually construct a circuit, so the user has a better chance of
+      knowing what's going on. Fixes bug 1362.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index b77107c..f4c1660 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -4783,6 +4783,13 @@ update_router_have_minimum_dir_info(void)
     log(quiet ? LOG_INFO : LOG_NOTICE, LD_DIR,
         "Our directory information is no longer up-to-date "
         "enough to build circuits: %s", dir_info_status);
+
+    /* a) make us log when we next complete a circuit, so we know when Tor
+     * is back up and usable, and b) disable some activities that Tor
+     * should only do while circuits are working, like reachability tests
+     * and fetching bridge descriptors only over circuits. */
+    has_completed_circuit = 0;
+
     control_event_client_status(LOG_NOTICE, "NOT_ENOUGH_DIR_INFO");
   }
   have_min_dir_info = res;
-- 
1.7.1




More information about the tor-commits mailing list