[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r10120: Implement "getinfo status/circuit-established" (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r10120: Implement "getinfo status/circuit-established" (in tor/trunk: . src/or)
- From: arma@xxxxxxxx
- Date: Sat, 5 May 2007 18:51:05 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Sat, 05 May 2007 18:51:26 -0400
- Reply-to: or-dev@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: arma
Date: 2007-05-05 18:51:02 -0400 (Sat, 05 May 2007)
New Revision: 10120
Modified:
tor/trunk/ChangeLog
tor/trunk/src/or/control.c
Log:
Implement "getinfo status/circuit-established"
Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog 2007-05-04 12:17:12 UTC (rev 10119)
+++ tor/trunk/ChangeLog 2007-05-05 22:51:02 UTC (rev 10120)
@@ -80,6 +80,7 @@
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.
Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c 2007-05-04 12:17:12 UTC (rev 10119)
+++ tor/trunk/src/or/control.c 2007-05-05 22:51:02 UTC (rev 10120)
@@ -1462,6 +1462,12 @@
*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 @@
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."),