diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-03 18:58:56 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-03 18:58:56 +0000 |
commit | 55bd42d50f0f37f4e9e72d8dd8d6b7768ce4d7ba (patch) | |
tree | e8f03a11cba50636e26c74291cdb3935b6f0c971 /src/or/control.c | |
parent | c796adc7df86f0451b3454cc9c3c20c04ba2b35f (diff) | |
download | tor-55bd42d50f0f37f4e9e72d8dd8d6b7768ce4d7ba.tar.gz tor-55bd42d50f0f37f4e9e72d8dd8d6b7768ce4d7ba.zip |
r8841@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.
svn:r8585
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/control.c b/src/or/control.c index f9bcf9827a..49417dcb13 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -999,7 +999,7 @@ handle_control_setevents(control_connection_t *conn, uint32_t len, 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 @@ handle_control_usefeature(control_connection_t *conn, { 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 @@ handle_control_usefeature(control_connection_t *conn, conn->use_long_names = 1; control_update_global_event_mask(); } + if (extended_events) + conn->use_extended_events = 1; send_control_done(conn); } |