diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-10-14 08:48:54 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-10-14 08:48:54 +0000 |
commit | 3cb69a9ce4df28d7b8e6b0a6bd3c29dc28c2102b (patch) | |
tree | ef5eb5ed709752af9fe993c807a3aa2b85e9c6ea | |
parent | dd44c068c5b962c26efd52c0ae013f281b743d8e (diff) | |
download | tor-3cb69a9ce4df28d7b8e6b0a6bd3c29dc28c2102b.tar.gz tor-3cb69a9ce4df28d7b8e6b0a6bd3c29dc28c2102b.zip |
r15762@catbus: nickm | 2007-10-14 04:33:10 -0400
Minimal backport for r11882: Fix bug 451 by bailing out of connection_finish_flushing when there is no socket or write_event.
svn:r11927
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/TODO.012 | 2 | ||||
-rw-r--r-- | src/or/connection.c | 3 |
3 files changed, 8 insertions, 1 deletions
@@ -9,6 +9,10 @@ Changes in version 0.1.2.18 - 2007-??-?? connections: they specify their chosen rendezvous point by identity digest rather than by (potentially ambiguous) nickname. These changes could speed up hidden service connections dramatically. + - If a connection is shut down abruptly because of something that + happened inside connection_flushed_some(), do not call + connection_finished_flushing(). Should fix bug 451. Bugfix on + 0.1.2.7-alpha. o Minor bugfixes: - Don't try to access (or alter) the state file when running diff --git a/doc/TODO.012 b/doc/TODO.012 index 6126f3e966..9a03d4ba52 100644 --- a/doc/TODO.012 +++ b/doc/TODO.012 @@ -4,7 +4,7 @@ description of the patch.) Backport items for 0.1.2: o r11166: Don't believe future dates from the state file. o r11828+: Detect bad sa_family from accept(). -N - r11882: Avoid crash-bug 451. + o r11882: Avoid crash-bug 451. N - r11886: Consider family as well as identity when cannibalizing circuits. diff --git a/src/or/connection.c b/src/or/connection.c index e92345aeb3..e7c2365595 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2289,6 +2289,9 @@ connection_finished_flushing(connection_t *conn) { tor_assert(conn); + if (conn->s < 0 || !conn->write_event) + return 0; + // log_fn(LOG_DEBUG,"entered. Socket %u.", conn->s); switch (conn->type) { |