[tor-commits] [tor/master] changes file and whitespace fix for bug5235 patch

nickm at torproject.org nickm at torproject.org
Fri Jun 8 18:37:25 UTC 2012


commit 8be6058d8f31e578de2ba9783b2ccb5da5ab0d9e
Author: Nick Mathewson <nickm at torproject.org>
Date:   Fri Jun 8 14:32:09 2012 -0400

    changes file and whitespace fix for bug5235 patch
---
 changes/bug5235_log |    4 ++++
 src/or/routerlist.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/changes/bug5235_log b/changes/bug5235_log
new file mode 100644
index 0000000..2448a00
--- /dev/null
+++ b/changes/bug5235_log
@@ -0,0 +1,4 @@
+  o Minor features:
+    - Rate-limit the "Weighted bandwidth is 0.000000" message, and add
+      more information to it, so that we can track it down in case it
+      returns again. Mitigates bug 5235.
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 3be029b..feda4f1 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1847,8 +1847,8 @@ smartlist_choose_node_by_bandwidth_weights(smartlist_t *sl,
       static ratelim_t zero_bandwidth_warning_limit =
         RATELIM_INIT(ZERO_BANDWIDTH_WARNING_INTERVAL);
       char *msg;
-      if ( ( msg = rate_limit_log( &zero_bandwidth_warning_limit,
-                                 approx_time() ) ) ) {
+      if ((msg = rate_limit_log(&zero_bandwidth_warning_limit,
+                                approx_time()))) {
         log_warn(LD_CIRC,
                  "Weighted bandwidth is %f in node selection for rule %s "
                  "(unweighted was %f) %s",



More information about the tor-commits mailing list