]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Deliver circuit handshake counts as part of the heartbeat
authorNick Mathewson <nickm@torproject.org>
Thu, 6 Feb 2014 18:03:01 +0000 (13:03 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Feb 2014 18:03:01 +0000 (13:03 -0500)
Previously, they went out once an hour, unconditionally.

Fixes 10485; bugfix on 0.2.4.17-rc.

changes/bug10485 [new file with mode: 0644]
src/or/main.c
src/or/rephist.c
src/or/status.c

diff --git a/changes/bug10485 b/changes/bug10485
new file mode 100644 (file)
index 0000000..7e5fa53
--- /dev/null
@@ -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.
index deed798e803e60c5b47959f1a06ffcb6b684819f..bd23141b9748f248175f0112548e96f1b72b7ad2 100644 (file)
@@ -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.
index 131e531b1983d4dc65ece2dd4486e8be9964ca0f..2948bf8f001d47e7e6c5573113796a7cf51b0ea5 100644 (file)
@@ -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],
index d239e6ee75469c14c32f54ca631f711f088e692c..4c4215504b6b499daeb30ccedd4a69c11cb80fdf 100644 (file)
@@ -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);