diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-01-30 11:59:51 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-01-30 11:59:51 -0500 |
commit | 29136bd7e4a671bf58dcc7c5d8d82fd63f9c66f7 (patch) | |
tree | 5fc379286043c84be7328472cd6967ebb50bcd5b /src/or/config.c | |
parent | a0351311aeea715cea24e156e065b65cc29a804c (diff) | |
parent | 02c320916e025eca63d0ae23aa4f610095c7857c (diff) | |
download | tor-29136bd7e4a671bf58dcc7c5d8d82fd63f9c66f7.tar.gz tor-29136bd7e4a671bf58dcc7c5d8d82fd63f9c66f7.zip |
Merge branch 'bug5956_squashed'
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 0e9c0fd6f1..dcd053ff62 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -331,6 +331,7 @@ static config_var_t option_vars_[] = { V(PathBiasExtremeUseRate, DOUBLE, "-1"), V(PathBiasScaleUseThreshold, INT, "-1"), + V(PathsNeededToBuildCircuits, DOUBLE, "-1"), OBSOLETE("PathlenCoinWeight"), V(PerConnBWBurst, MEMUNIT, "0"), V(PerConnBWRate, MEMUNIT, "0"), @@ -2392,6 +2393,18 @@ options_validate(or_options_t *old_options, or_options_t *options, return -1; } + if (options->PathsNeededToBuildCircuits >= 0.0) { + if (options->PathsNeededToBuildCircuits < 0.25) { + log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing " + "to 0.25"); + options->PathsNeededToBuildCircuits = 0.25; + } else if (options->PathsNeededToBuildCircuits < 0.95) { + log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too high. Decreasing " + "to 0.95"); + options->PathsNeededToBuildCircuits = 0.95; + } + } + if (options->MaxClientCircuitsPending <= 0 || options->MaxClientCircuitsPending > MAX_MAX_CLIENT_CIRCUITS_PENDING) { tor_asprintf(msg, |