diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-08-16 18:32:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-08-16 18:32:45 +0000 |
commit | 278b75619a0efff9b0d5a38125610b42f6bbce33 (patch) | |
tree | a3a31338e9f96862345dde0f2bd16995dcd58b8d | |
parent | 00581b58e939ebbaa977b524bedca69e79e6588c (diff) | |
download | tor-278b75619a0efff9b0d5a38125610b42f6bbce33.tar.gz tor-278b75619a0efff9b0d5a38125610b42f6bbce33.zip |
r14610@catbus: nickm | 2007-08-16 14:31:44 -0400
Terminate multi-line controller events correctly with a single "650 OK". Backport of 10964.
svn:r11143
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/TODO.012 | 2 | ||||
-rw-r--r-- | src/or/control.c | 3 |
3 files changed, 5 insertions, 1 deletions
@@ -27,6 +27,7 @@ Changes in version 0.1.2.xx - 2007-xxxxx where no controller could authenticate. Now we exit. - If we require CookieAuthentication, stop generating a new cookie every time we change any piece of our config. + - Terminate multi-line control events properly. (Original patch from tup.) Changes in version 0.1.2.16 - 2007-08-01 diff --git a/doc/TODO.012 b/doc/TODO.012 index 427d6e7eb1..4aacea5b3c 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -13,7 +13,7 @@ Backport for 0.1.2.x once better tested: - r10579: new addsysuser implementation for osx (??) - Some fix for bug 438 (??) - coderman's constrained socket buffers patch (r10843) - - r10964: control.c grammar conformance. could conceivably break + o r10964: control.c grammar conformance. could conceivably break old controllers that were relying on non-conformance. diff --git a/src/or/control.c b/src/or/control.c index 80ea17bed0..7546c6500b 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -3181,6 +3181,8 @@ control_event_or_authdir_new_descriptor(const char *action, strlcpy(buf+strlen(firstline), esc, totallen); send_control1_event_string(EVENT_AUTHDIR_NEWDESCS, ALL_NAMES|ALL_FORMATS, buf); + send_control1_event_string(EVENT_AUTHDIR_NEWDESCS, ALL_NAMES|ALL_FORMATS, + "650 OK\r\n"); tor_free(esc); tor_free(buf); @@ -3212,6 +3214,7 @@ control_event_networkstatus_changed(smartlist_t *statuses) SMARTLIST_FOREACH(strs, char *, cp, tor_free(cp)); smartlist_free(strs); send_control1_event_string(EVENT_NS, ALL_NAMES|ALL_FORMATS, s); + send_control1_event_string(EVENT_NS, ALL_NAMES|ALL_FORMATS, "650 OK\r\n"); tor_free(s); return 0; } |