[or-cvs] r8585: Add EXTENDED_EVENTS to the USEFEATURE command; move flag fro (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Tue Oct 3 18:58:57 UTC 2006


Author: nickm
Date: 2006-10-03 14:58:56 -0400 (Tue, 03 Oct 2006)
New Revision: 8585

Modified:
   tor/trunk/
   tor/trunk/src/or/control.c
   tor/trunk/src/or/or.h
Log:
 r8841 at totoro:  nickm | 2006-10-02 15:59:21 -0400
 Add EXTENDED_EVENTS to the USEFEATURE command; move flag from connection_t into control_conn, since we will probably grow more of these.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/branches/verbose-nicknames [r8841] on 96637b51-b116-0410-a10e-9941ebb49b64

Modified: tor/trunk/src/or/control.c
===================================================================
--- tor/trunk/src/or/control.c	2006-10-03 18:58:52 UTC (rev 8584)
+++ tor/trunk/src/or/control.c	2006-10-03 18:58:56 UTC (rev 8585)
@@ -999,7 +999,7 @@
     smartlist_free(events);
   }
   conn->event_mask = event_mask;
-  conn->_base.control_events_are_extended = extended;
+  conn->use_extended_events = extended;
 
   control_update_global_event_mask();
   send_control_done(conn);
@@ -2315,13 +2315,16 @@
 {
   tor_assert(! STATE_IS_V0(conn->_base.state));
   smartlist_t *args;
-  int verbose_names = 0, bad = 0;
+  int verbose_names = 0, extended_events = 0;
+  int bad = 0;
   args = smartlist_create();
   smartlist_split_string(args, body, " ",
                          SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
   SMARTLIST_FOREACH(args, const char *, arg, {
       if (!strcasecmp(arg, "VERBOSE_NAMES"))
         verbose_names = 1;
+      if (!strcasecmp(arg, "EXTENDED_EVENTS"))
+        extended_events = 1;
       else {
         connection_printf_to_buf(conn, "552 Unrecognized feature \"%s\"\r\n",
                                  arg);
@@ -2335,6 +2338,8 @@
       conn->use_long_names = 1;
       control_update_global_event_mask();
     }
+    if (extended_events)
+      conn->use_extended_events = 1;
     send_control_done(conn);
   }
 

Modified: tor/trunk/src/or/or.h
===================================================================
--- tor/trunk/src/or/or.h	2006-10-03 18:58:52 UTC (rev 8584)
+++ tor/trunk/src/or/or.h	2006-10-03 18:58:56 UTC (rev 8585)
@@ -642,9 +642,6 @@
   unsigned edge_has_sent_end:1; /**< For debugging; only used on edge
                          * connections.  Set once we've set the stream end,
                          * and check in circuit_about_to_close_connection(). */
-  /** For control connections only. If set, we send extended info with control
-   * events as appropriate. */
-  unsigned int control_events_are_extended:1;
   /** Used for OR conns that shouldn't get any new circs attached to them. */
   unsigned int or_is_obsolete:1;
   /** For AP connections only. If 1, and we fail to reach the chosen exit,
@@ -789,6 +786,10 @@
   unsigned int use_long_names:1; /**< True if we should use long nicknames
                                   * on this (v1) connection. Only settable
                                   * via v1 controllers. */
+  /** For control connections only. If set, we send extended info with control
+   * events as appropriate. */
+  unsigned int use_extended_events:1;
+
   uint32_t incoming_cmd_len;
   uint32_t incoming_cmd_cur_len;
   char *incoming_cmd;



More information about the tor-commits mailing list