[or-cvs] r10782: Patch from tup: add GETINFO status/enough-dir-info (in tor/trunk: . doc/spec src/or)

nickm at seul.org nickm at seul.org
Tue Jul 10 17:14:56 UTC 2007


Author: nickm
Date: 2007-07-10 13:14:55 -0400 (Tue, 10 Jul 2007)
New Revision: 10782

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/doc/spec/control-spec.txt
   tor/trunk/src/or/control.c
Log:
 r13667 at catbus:  nickm | 2007-07-10 13:12:52 -0400
 Patch from tup: add GETINFO status/enough-dir-info



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13667] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-07-10 17:14:51 UTC (rev 10781)
+++ tor/trunk/ChangeLog	2007-07-10 17:14:55 UTC (rev 10782)
@@ -17,6 +17,8 @@
       from Robert Hogan.)
     - Add a RESOLVE command to launch hostname lookups. (Original patch
       from Robert Hogan.)
+    - Add GETINFO status/enough-dir-info to let controllers tell whether
+      Tor has downloaded sufficient directory information. (Patch from Tup.)
 
   o Performance improvements (win32):
     - Use Critical Sections rather than Mutexes for synchronizing threads

Modified: tor/trunk/doc/spec/control-spec.txt
===================================================================
--- tor/trunk/doc/spec/control-spec.txt	2007-07-10 17:14:51 UTC (rev 10781)
+++ tor/trunk/doc/spec/control-spec.txt	2007-07-10 17:14:55 UTC (rev 10782)
@@ -484,6 +484,7 @@
       an empty string.
 
     "status/circuit-established"
+    "status/enough-dir-info"
     "status/..."
       These provide the current internal Tor values for various Tor
       states. See Section 4.1.10 for explanations. (Only a few of the
@@ -695,6 +696,8 @@
   request is done in the background: to see the answers, your controller will
   need to listen for ADDRMAP events; see 4.1.7 below.
 
+  [Added in Tor 0.2.0.3-alpha]
+
 4. Replies
 
   Reply codes follow the same 3-character format as used by SMTP, with the

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2007-07-10 17:14:51 UTC (rev 10781)
+++ tor/trunk/src/or/control.c	2007-07-10 17:14:55 UTC (rev 10782)
@@ -1483,6 +1483,8 @@
      * 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 @@
   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."),



More information about the tor-commits mailing list