aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitstats.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-18 10:06:27 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-18 10:06:27 -0400
commitb214c2c0955373bdf0eab6954c19dd9b559200cf (patch)
tree2f5cc8de4ca63b7f9c4087448ce4693cda15b84a /src/or/circuitstats.c
parente04da2828d6bbf1499d3df5ba85a8baf4c485bb7 (diff)
parent935cd77f62f036e615923742de278398aa85f2bf (diff)
downloadtor-b214c2c0955373bdf0eab6954c19dd9b559200cf.tar.gz
tor-b214c2c0955373bdf0eab6954c19dd9b559200cf.zip
Merge branch 'maint-0.3.0'
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r--src/or/circuitstats.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index fe6f723bd5..51d580a1a4 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -107,10 +107,19 @@ get_circuit_build_timeout_ms(void)
int
circuit_build_times_disabled(const or_options_t *options)
{
+ return circuit_build_times_disabled_(options, 0);
+}
+
+/** As circuit_build_times_disabled, but take options as an argument. */
+int
+circuit_build_times_disabled_(const or_options_t *options,
+ int ignore_consensus)
+{
if (unit_tests) {
return 0;
} else {
- int consensus_disabled = networkstatus_get_param(NULL, "cbtdisabled",
+ int consensus_disabled =
+ ignore_consensus ? 0 : networkstatus_get_param(NULL, "cbtdisabled",
0, 0, 1);
int config_disabled = !options->LearnCircuitBuildTimeout;
int dirauth_disabled = options->AuthoritativeDir;