mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Make PathsNeededToBuildCircuits option work.
This commit is contained in:
parent
cd5048d61e
commit
1bce70a9e3
@ -2485,7 +2485,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing "
|
log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too low. Increasing "
|
||||||
"to 0.25");
|
"to 0.25");
|
||||||
options->PathsNeededToBuildCircuits = 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 "
|
log_warn(LD_CONFIG, "PathsNeededToBuildCircuits is too high. Decreasing "
|
||||||
"to 0.95");
|
"to 0.95");
|
||||||
options->PathsNeededToBuildCircuits = 0.95;
|
options->PathsNeededToBuildCircuits = 0.95;
|
||||||
|
@ -1418,7 +1418,7 @@ get_frac_paths_needed_for_circs(const or_options_t *options,
|
|||||||
const networkstatus_t *ns)
|
const networkstatus_t *ns)
|
||||||
{
|
{
|
||||||
#define DFLT_PCT_USABLE_NEEDED 60
|
#define DFLT_PCT_USABLE_NEEDED 60
|
||||||
if (options->PathsNeededToBuildCircuits >= 1.0) {
|
if (options->PathsNeededToBuildCircuits >= 0.0) {
|
||||||
return options->PathsNeededToBuildCircuits;
|
return options->PathsNeededToBuildCircuits;
|
||||||
} else {
|
} else {
|
||||||
return networkstatus_get_param(ns, "min_paths_for_circs_pct",
|
return networkstatus_get_param(ns, "min_paths_for_circs_pct",
|
||||||
|
Loading…
Reference in New Issue
Block a user