[or-cvs] r18566: {tor} docdoc and changelog for r18556 (in tor/trunk: . src/or)

arma at seul.org arma at seul.org
Mon Feb 16 10:39:10 UTC 2009


Author: arma
Date: 2009-02-16 05:39:10 -0500 (Mon, 16 Feb 2009)
New Revision: 18566

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/control.c
   tor/trunk/src/or/networkstatus.c
Log:
docdoc and changelog for r18556


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2009-02-16 10:28:38 UTC (rev 18565)
+++ tor/trunk/ChangeLog	2009-02-16 10:39:10 UTC (rev 18566)
@@ -27,6 +27,9 @@
   o Minor features:
     - On Linux, use the prctl call to re-enable core dumps when the user
       is option is set.
+    - New controller event NEWCONSENSUS that lists the networkstatus
+      lines for every recommended relay. Now controllers like Torflow
+      can keep up-to-date on which relays they should be using.
     - Update to the "January 23 2009" ip-to-country file.
 
 

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2009-02-16 10:28:38 UTC (rev 18565)
+++ tor/trunk/src/or/control.c	2009-02-16 10:39:10 UTC (rev 18566)
@@ -3517,8 +3517,10 @@
   return 0;
 }
 
-/** Called when the routerstatus_ts <b>statuses</b> have changed: sends
- * an NS event to any controller that cares. */
+/** Helper function for NS-style events. Constructs and sends an event
+ * of type <b>event</b> with string <b>event_string</b> out of the set of
+ * networkstatuses <b>statuses</b>. Currently it is used for NS events
+ * and NEWCONSENSUS events. */
 static int
 control_event_networkstatus_changed_helper(smartlist_t *statuses,
                                            uint16_t event,
@@ -3553,12 +3555,16 @@
   return 0;
 }
 
+/** Called when the routerstatus_ts <b>statuses</b> have changed: sends
+ * an NS event to any controller that cares. */
 int
 control_event_networkstatus_changed(smartlist_t *statuses)
 {
   return control_event_networkstatus_changed_helper(statuses, EVENT_NS, "NS");
 }
 
+/** Called when we get a new consensus networkstatus. Sends a NEWCONSENSUS
+ * event consisting of an NS-style line for each relay in the consensus. */
 int
 control_event_newconsensus(const networkstatus_t *consensus)
 {

Modified: tor/trunk/src/or/networkstatus.c
===================================================================
--- tor/trunk/src/or/networkstatus.c	2009-02-16 10:28:38 UTC (rev 18565)
+++ tor/trunk/src/or/networkstatus.c	2009-02-16 10:39:10 UTC (rev 18566)
@@ -1318,6 +1318,8 @@
   if (old_c == new_c)
     return;
 
+  /* tell the controller exactly which relays are still listed, as well
+   * as what they're listed as */
   control_event_newconsensus(new_c);
 
   if (!old_c) {



More information about the tor-commits mailing list