diff options
author | David Goulet <dgoulet@torproject.org> | 2017-01-18 12:53:01 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-01-18 12:53:01 -0500 |
commit | 0069d14753e6050cc20ccd2009b3e04ab8426497 (patch) | |
tree | 0a09d4fa121e1248ff471f0a41b8ba9a34c13689 /src/or/circuituse.c | |
parent | fa00f2dce5a93164e36860794b75c595067c2f63 (diff) | |
download | tor-0069d14753e6050cc20ccd2009b3e04ab8426497.tar.gz tor-0069d14753e6050cc20ccd2009b3e04ab8426497.zip |
circuit: Make circuit_build_times_disabled take an or_options_t
That way, when we are parsing the options and LearnCircuitBuildTimeout is set
to 0, we don't assert trying to get the options list with get_options().
Fixes #21062
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/circuituse.c')
-rw-r--r-- | src/or/circuituse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/circuituse.c b/src/or/circuituse.c index ecd35af9dd..72293f577e 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1140,7 +1140,7 @@ needs_circuits_for_build(int num) { if (router_have_consensus_path() != CONSENSUS_PATH_UNKNOWN) { if (num < CBT_MAX_UNUSED_OPEN_CIRCUITS && - !circuit_build_times_disabled() && + !circuit_build_times_disabled(get_options()) && circuit_build_times_needs_circuits_now(get_circuit_build_times())) { return 1; } @@ -1400,7 +1400,7 @@ circuit_expire_old_circuits_clientside(void) cutoff = now; last_expired_clientside_circuits = now.tv_sec; - if (! circuit_build_times_disabled() && + if (! circuit_build_times_disabled(get_options()) && circuit_build_times_needs_circuits(get_circuit_build_times())) { /* Circuits should be shorter lived if we need more of them * for learning a good build timeout */ |