aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-04-12 15:38:54 -0400
committerNick Mathewson <nickm@torproject.org>2010-04-12 15:38:54 -0400
commitd888a8210fc33d9d0ad835c05a2bf8b7b6882830 (patch)
treed0cad8809ca872a2851ec019ffeb2f0edfd46926 /src
parent8aec982f910f918785158038e5afafe55f869372 (diff)
downloadtor-d888a8210fc33d9d0ad835c05a2bf8b7b6882830.tar.gz
tor-d888a8210fc33d9d0ad835c05a2bf8b7b6882830.zip
Fix a bug in reading CircPriorityHalflife from consensus
When you mean (a=b(c,d)) >= 0, you had better not say (a=b(c,d)>=0). We did the latter, and so whenever CircPriorityHalflife was in the consensus, it was treated as having a value of 1 msec (that is, boolean true).
Diffstat (limited to 'src')
-rw-r--r--src/or/relay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 599d3d9c80..c417cbedcb 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -1865,7 +1865,7 @@ cell_ewma_set_scale_factor(or_options_t *options, networkstatus_t *consensus)
source = "CircuitPriorityHalflife in configuration";
} else if (consensus &&
(halflife_ms = networkstatus_get_param(
- consensus, "CircPriorityHalflifeMsec", -1) >= 0)) {
+ consensus, "CircPriorityHalflifeMsec", -1)) >= 0) {
halflife = ((double)halflife_ms)/1000.0;
source = "CircPriorityHalflifeMsec in consensus";
} else {