aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitstats.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-05-18 10:06:06 -0400
committerNick Mathewson <nickm@torproject.org>2017-05-18 10:06:06 -0400
commit935cd77f62f036e615923742de278398aa85f2bf (patch)
tree03ff72fd113b67752b3920c88bc7b6cc2bb00b8a /src/or/circuitstats.c
parent492f8a7c448dbdbea1966bdb9fd1775d3cda16fb (diff)
parent2ba58f275cef6ae70c0d6f5a94f8bd3ff99f1e5e (diff)
downloadtor-935cd77f62f036e615923742de278398aa85f2bf.tar.gz
tor-935cd77f62f036e615923742de278398aa85f2bf.zip
Merge branch 'bug22252_029' into 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 48cb89dc37..6e73372550 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;