diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-04-19 17:12:27 +0200 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-04-19 15:38:10 -0400 |
commit | 13c3884ff60aa0e58464f379f988683f1c30438a (patch) | |
tree | 0dadd37f533745277d7b71ca128a1b7ba20f4870 /src/or/rephist.c | |
parent | 5cc322e5472996fda6095e54de302c0f5c68ea92 (diff) | |
download | tor-13c3884ff60aa0e58464f379f988683f1c30438a.tar.gz tor-13c3884ff60aa0e58464f379f988683f1c30438a.zip |
Don't sometimes undercount bw average
This fixes the first part of bug 2704. It should occur only rarely when
no bw maxima are known. Bugfix on 0.2.2.23-alpha. Fixes bug 2704.
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r-- | src/or/rephist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c index 9b7eefecf2..6034bbcb2b 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -1673,7 +1673,7 @@ rep_hist_load_bwhist_state_section(bw_array_t *b, mv *= NUM_SECS_ROLLING_MEASURE; } else { /* No maxima known; guess average rate to be conservative. */ - mv = v / s_interval; + mv = (v / s_interval) * NUM_SECS_ROLLING_MEASURE; } if (!ok) { retval = -1; |