summaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-17 10:48:12 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-17 10:48:12 -0400
commit548d14247e3c8a48e2efb2ca62ee7a05fca843ba (patch)
tree461e46b28ff628235379dfa242fa44b1ca1eccfa /src/or/control.c
parent6cc3397e26ff37d6f01471b83e0e5bb1b5aa8eee (diff)
parent06031b441eb92f575f0a1c2ac264dc0daee4fbf4 (diff)
downloadtor-548d14247e3c8a48e2efb2ca62ee7a05fca843ba.tar.gz
tor-548d14247e3c8a48e2efb2ca62ee7a05fca843ba.zip
Merge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/or/control.c b/src/or/control.c
index e06d7d28a2..e2ad8cc6dc 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -2148,6 +2148,7 @@ getinfo_helper_events(control_connection_t *control_conn,
const char *question, char **answer,
const char **errmsg)
{
+ const or_options_t *options = get_options();
(void) control_conn;
if (!strcmp(question, "circuit-status")) {
smartlist_t *status = smartlist_new();
@@ -2284,17 +2285,19 @@ getinfo_helper_events(control_connection_t *control_conn,
*answer = tor_strdup(directories_have_accepted_server_descriptor()
? "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded/or")) {
- *answer = tor_strdup(check_whether_orport_reachable() ? "1" : "0");
+ *answer = tor_strdup(check_whether_orport_reachable(options) ?
+ "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded/dir")) {
- *answer = tor_strdup(check_whether_dirport_reachable() ? "1" : "0");
+ *answer = tor_strdup(check_whether_dirport_reachable(options) ?
+ "1" : "0");
} else if (!strcmp(question, "status/reachability-succeeded")) {
tor_asprintf(answer, "OR=%d DIR=%d",
- check_whether_orport_reachable() ? 1 : 0,
- check_whether_dirport_reachable() ? 1 : 0);
+ check_whether_orport_reachable(options) ? 1 : 0,
+ check_whether_dirport_reachable(options) ? 1 : 0);
} else if (!strcmp(question, "status/bootstrap-phase")) {
*answer = tor_strdup(last_sent_bootstrap_message);
} else if (!strcmpstart(question, "status/version/")) {
- int is_server = server_mode(get_options());
+ int is_server = server_mode(options);
networkstatus_t *c = networkstatus_get_latest_consensus();
version_status_t status;
const char *recommended;
@@ -2336,7 +2339,7 @@ getinfo_helper_events(control_connection_t *control_conn,
}
*answer = bridge_stats;
} else if (!strcmp(question, "status/fresh-relay-descs")) {
- if (!server_mode(get_options())) {
+ if (!server_mode(options)) {
*errmsg = "Only relays have descriptors";
return -1;
}