Make PathsNeededToBuildCircuits option work.

This commit is contained in:
Karsten Loesing 2013-03-28 09:42:49 +01:00 committed by Nick Mathewson
parent cd5048d61e
commit 1bce70a9e3
2 changed files with 2 additions and 2 deletions

View File

@ -2485,7 +2485,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",