diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-09-18 15:53:55 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-09-18 15:53:55 +0000 |
commit | f45dec169030b4047028c04fb21e9d98a3e59dac (patch) | |
tree | c038069bea5d27fccca098464d420234594e2825 /src | |
parent | a2b76beffffe8f817d7b21faa73be66745d9cd5a (diff) | |
download | tor-f45dec169030b4047028c04fb21e9d98a3e59dac.tar tor-f45dec169030b4047028c04fb21e9d98a3e59dac.tar.gz |
r15143@catbus: nickm | 2007-09-18 11:49:46 -0400
Add getinfo status/good-server-descriptor and status/reachability-succeeded. Patch from Robert Hogan.
svn:r11483
Diffstat (limited to 'src')
-rw-r--r-- | src/or/control.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c index adbfad736..0faaa502a 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1589,6 +1589,18 @@ getinfo_helper_events(control_connection_t *control_conn, *answer = tor_strdup(has_completed_circuit ? "1" : "0"); } else if (!strcmp(question, "status/enough-dir-info")) { *answer = tor_strdup(router_have_minimum_dir_info() ? "1" : "0"); + } else if (!strcmp(question, "status/good-server-descriptor")) { + *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"); + } else if (!strcmp(question, "status/reachability-succeeded/dir")) { + *answer = tor_strdup(check_whether_dirport_reachable() ? "1" : "0"); + } else if (!strcmp(question, "status/reachability-succeeded")) { + *answer = tor_malloc(16); + tor_snprintf(*answer, 16, "OR=%d DIR=%d", + check_whether_orport_reachable() ? 1 : 0, + check_whether_dirport_reachable() ? 1 : 0); } else if (!strcmpstart(question, "status/version/")) { combined_version_status_t st; int is_server = server_mode(get_options()); |