[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/maint-0.3.2] Tweak the message when we re-enable CBT.



commit ef55a7a69a131e50cce9702064399549bb4d63bc
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Wed Nov 15 14:42:59 2017 -0500

    Tweak the message when we re-enable CBT.
    
    Implements ticket 20963.
---
 changes/bug20963      |  4 ++++
 src/or/circuitstats.c | 11 ++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/changes/bug20963 b/changes/bug20963
new file mode 100644
index 000000000..a65c58399
--- /dev/null
+++ b/changes/bug20963
@@ -0,0 +1,4 @@
+  o Minor features (logging):
+    - Improve the message we log when re-enabling circuit build timeouts
+      after having received a consensus. Closes ticket 20963.
+
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index 923a6d794..b8421a3c7 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -431,9 +431,14 @@ circuit_build_times_new_consensus_params(circuit_build_times_t *cbt,
     if (num > 0) {
       if (num != cbt->liveness.num_recent_circs) {
         int8_t *recent_circs;
-        log_notice(LD_CIRC, "The Tor Directory Consensus has changed how many "
-                   "circuits we must track to detect network failures from %d "
-                   "to %d.", cbt->liveness.num_recent_circs, num);
+        if (cbt->liveness.num_recent_circs > 0) {
+          log_notice(LD_CIRC, "The Tor Directory Consensus has changed how "
+                     "many circuits we must track to detect network failures "
+                     "from %d to %d.", cbt->liveness.num_recent_circs, num);
+        } else {
+          log_notice(LD_CIRC, "Upon receiving a consensus directory, "
+                     "re-enabling circuit-based network failure detection.");
+        }
 
         tor_assert(cbt->liveness.timeouts_after_firsthop ||
                    cbt->liveness.num_recent_circs == 0);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits