Merge remote-tracking branch 'origin/maint-0.2.4'

This commit is contained in:
Nick Mathewson 2013-03-28 09:33:58 -04:00
commit 097a08f6fe
3 changed files with 6 additions and 2 deletions

4
changes/bug8599 Normal file
View File

@ -0,0 +1,4 @@
o Minor bugfixes:
- Fix some logic errors when the user manually overrides the
PathsNeededToBuildCircuits option in torrc. Fixes bug 8599; bugfix
on 0.2.4.10-alpha.

View File

@ -2486,7 +2486,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing "
"to 0.25");
options->PathsNeededToBuildCircuits = 0.25;
} else if (options->PathsNeededToBuildCircuits < 0.95) {
} else if (options->PathsNeededToBuildCircuits > 0.95) {
log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too high. Decreasing "
"to 0.95");
options->PathsNeededToBuildCircuits = 0.95;

View File

@ -1418,7 +1418,7 @@ get_frac_paths_needed_for_circs(const or_options_t *options,
const networkstatus_t *ns)
{
#define DFLT_PCT_USABLE_NEEDED 60
if (options->PathsNeededToBuildCircuits >= 1.0) {
if (options->PathsNeededToBuildCircuits >= 0.0) {
return options->PathsNeededToBuildCircuits;
} else {
return networkstatus_get_param(ns, "min_paths_for_circs_pct",