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

[tor-commits] [tor/maint-0.2.4] Deliver circuit handshake counts as part of the heartbeat



commit edc6fa25706534b35259111797fade88c9b694da
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Feb 6 13:03:01 2014 -0500

    Deliver circuit handshake counts as part of the heartbeat
    
    Previously, they went out once an hour, unconditionally.
    
    Fixes 10485; bugfix on 0.2.4.17-rc.
---
 changes/bug10485 |    4 ++++
 src/or/main.c    |    5 -----
 src/or/rephist.c |    1 -
 src/or/status.c  |    3 +++
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/changes/bug10485 b/changes/bug10485
new file mode 100644
index 0000000..7e5fa53
--- /dev/null
+++ b/changes/bug10485
@@ -0,0 +1,4 @@
+  o Minor bugfixes:
+    - Move message about circuit handshake counts into the heartbeat
+      message where it belongs, instead of logging it once per hour
+      unconditionally. Fixes bug 10485; bugfix on 0.2.4.17-rc.
diff --git a/src/or/main.c b/src/or/main.c
index deed798..bd23141 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1353,11 +1353,6 @@ run_scheduled_events(time_t now)
         next_time_to_write_stats_files = next_write;
     }
     time_to_write_stats_files = next_time_to_write_stats_files;
-
-    /* Also commandeer this opportunity to log how our circuit handshake
-     * stats have been doing. */
-    if (public_server_mode(options))
-      rep_hist_log_circuit_handshake_stats(now);
   }
 
   /* 1h. Check whether we should write bridge statistics to disk.
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 131e531..2948bf8 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -3041,7 +3041,6 @@ void
 rep_hist_log_circuit_handshake_stats(time_t now)
 {
   (void)now;
-  /* XXX024 maybe quiet this log message before 0.2.4 goes stable for real */
   log_notice(LD_HIST, "Circuit handshake stats since last time: "
              "%d/%d TAP, %d/%d NTor.",
              onion_handshakes_completed[ONION_HANDSHAKE_TYPE_TAP],
diff --git a/src/or/status.c b/src/or/status.c
index d239e6e..4c42155 100644
--- a/src/or/status.c
+++ b/src/or/status.c
@@ -121,6 +121,9 @@ log_heartbeat(time_t now)
     log_notice(LD_HEARTBEAT, "TLS write overhead: %.f%%", overhead);
   }
 
+  if (public_server_mode(options))
+    rep_hist_log_circuit_handshake_stats(now);
+
   tor_free(uptime);
   tor_free(bw_sent);
   tor_free(bw_rcvd);



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