diff options
author | Roger Dingledine <arma@torproject.org> | 2007-05-05 22:51:02 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2007-05-05 22:51:02 +0000 |
commit | 43411ceed32ca82ad7f10198008f43426020b07d (patch) | |
tree | 44faa3d695dc8821cc3a280012fe1aea404a6108 | |
parent | 713626bd731924b058979d6cd2e3f4fe3f38763b (diff) | |
download | tor-43411ceed32ca82ad7f10198008f43426020b07d.tar.gz tor-43411ceed32ca82ad7f10198008f43426020b07d.zip |
Implement "getinfo status/circuit-established"
svn:r10120
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/or/control.c | 9 |
2 files changed, 10 insertions, 0 deletions
@@ -80,6 +80,7 @@ Changes in version 0.2.0.1-alpha - 2007-??-?? preemptively. - Let the controller specify HOP=%d as an argument to ATTACHSTREAM, so we can exit from the middle of the circuit. + - Implement "getinfo status/circuit-established". o Minor features (other): - Correctly report Windows 95 OSR2 and Windows 98 SE. diff --git a/src/or/control.c b/src/or/control.c index 9222220636..3f87943163 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -1462,6 +1462,12 @@ getinfo_helper_events(control_connection_t *control_conn, *answer = smartlist_join_strings(mappings, "\r\n", 0, NULL); SMARTLIST_FOREACH(mappings, char *, cp, tor_free(cp)); smartlist_free(mappings); + } else if (!strcmpstart(question, "status/")) { + if (!strcmp(question, "status/circuit-established")) { + *answer = tor_strdup(has_completed_circuit ? "1" : "0"); + } else { + return 0; + } } return 0; } @@ -1538,6 +1544,9 @@ static const getinfo_item_t getinfo_items[] = { DOC("addr-mappings/cache", "Current cached DNS replies."), DOC("addr-mappings/config", "Current address mappings from configuration."), DOC("addr-mappings/control", "Current address mappings from controller."), + PREFIX("status/", events, NULL), + DOC("status/circuit-established", + "Whether we think client functionality is working."), ITEM("address", misc, "IP address of this Tor host, if we can guess it."), ITEM("dir-usage", misc, "Breakdown of bytes transferred over DirPort."), |