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.
--- /dev/null
+ o Minor bugfixes:
+ - Fix an issue causing calculation of Tor's average bandwidth as saved
+ in the state file to be 10 times smaller than it should be. Fixes the
+ first part of bug 2704, bugfix on tor-0.2.2.23-alpha.
+
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;