Merge branch 'bug8235-fix-rebased' into maint-0.2.4

This commit is contained in:
Nick Mathewson 2013-04-24 22:04:15 -04:00
commit cab5f82d12
3 changed files with 10 additions and 4 deletions

6
changes/bug8253-fix Normal file
View file

@ -0,0 +1,6 @@
o Minor bugfixes (log messages)
- Fix a scaling issue in the path bias accounting code that resulted in
"Bug:" log messages from either pathbias_scale_close_rates() or
pathbias_count_build_success(). This represents a bugfix on a previous
bugfix: The original fix attempted in 0.2.4.10-alpha was incomplete.
Fixes bug 8235; bugfix on 0.2.4.1-alpha.

View file

@ -2491,7 +2491,7 @@ pathbias_scale_close_rates(entry_guard_t *guard)
/* Verify that the counts are sane before and after scaling */ /* Verify that the counts are sane before and after scaling */
int counts_are_sane = (guard->circ_attempts >= guard->circ_successes); int counts_are_sane = (guard->circ_attempts >= guard->circ_successes);
guard->circ_attempts -= opened_attempts; guard->circ_attempts -= (opened_attempts+opened_built);
guard->circ_successes -= opened_built; guard->circ_successes -= opened_built;
guard->circ_attempts *= scale_ratio; guard->circ_attempts *= scale_ratio;
@ -2501,7 +2501,7 @@ pathbias_scale_close_rates(entry_guard_t *guard)
guard->collapsed_circuits *= scale_ratio; guard->collapsed_circuits *= scale_ratio;
guard->unusable_circuits *= scale_ratio; guard->unusable_circuits *= scale_ratio;
guard->circ_attempts += opened_attempts; guard->circ_attempts += (opened_attempts+opened_built);
guard->circ_successes += opened_built; guard->circ_successes += opened_built;
entry_guards_changed(); entry_guards_changed();

View file

@ -1215,7 +1215,7 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
int severity = LOG_INFO; int severity = LOG_INFO;
/* If this state file was written by a Tor that would have /* If this state file was written by a Tor that would have
* already fixed it, then the overcounting bug is still there.. */ * already fixed it, then the overcounting bug is still there.. */
if (tor_version_as_new_as(state_version, "0.2.4.12-alpha")) { if (tor_version_as_new_as(state_version, "0.2.4.13-alpha")) {
severity = LOG_NOTICE; severity = LOG_NOTICE;
} }
log_fn(severity, LD_BUG, log_fn(severity, LD_BUG,
@ -1280,7 +1280,7 @@ entry_guards_parse_state(or_state_t *state, int set, char **msg)
int severity = LOG_INFO; int severity = LOG_INFO;
/* If this state file was written by a Tor that would have /* If this state file was written by a Tor that would have
* already fixed it, then the overcounting bug is still there.. */ * already fixed it, then the overcounting bug is still there.. */
if (tor_version_as_new_as(state_version, "0.2.4.12-alpha")) { if (tor_version_as_new_as(state_version, "0.2.4.13-alpha")) {
severity = LOG_NOTICE; severity = LOG_NOTICE;
} }
log_fn(severity, LD_BUG, log_fn(severity, LD_BUG,