diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-07-10 17:14:55 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-07-10 17:14:55 +0000 |
commit | a8465adaa2a074f6e414d5024af11219b2f5a57b (patch) | |
tree | 5c0c631920be1a9646f91f3a165d9b1f9c1d6571 /src/or/control.c | |
parent | 74711479eb22faf146b579e1856b37ee4a5afc8b (diff) | |
download | tor-a8465adaa2a074f6e414d5024af11219b2f5a57b.tar tor-a8465adaa2a074f6e414d5024af11219b2f5a57b.tar.gz |
r13667@catbus: nickm | 2007-07-10 13:12:52 -0400
Patch from tup: add GETINFO status/enough-dir-info
svn:r10782
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/control.c b/src/or/control.c index 055d278d2..71be8a568 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1483,6 +1483,8 @@ getinfo_helper_events(control_connection_t *control_conn, * to be a status GETINFO if there's a corresponding STATUS event. */ if (!strcmp(question, "status/circuit-established")) { *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 (!strcmpstart(question, "status/version/")) { combined_version_status_t st; int is_server = server_mode(get_options()); @@ -1595,6 +1597,9 @@ static const getinfo_item_t getinfo_items[] = { PREFIX("status/", events, NULL), DOC("status/circuit-established", "Whether we think client functionality is working."), + DOC("status/enough-dir-info", + "Whether we have enough up-to-date directory information to build " + "circuits."), /* DOCDOC specify status/version/ */ DOC("status/version/recommended", "List of currently recommended versions."), DOC("status/version/current", "Status of the current version."), |