[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r11927: Minimal backport for r11882: Fix bug 451 by bailing out of c (in tor/branches/tor-0_1_2-patches: . doc src/or)
Author: nickm
Date: 2007-10-14 04:48:54 -0400 (Sun, 14 Oct 2007)
New Revision: 11927
Modified:
tor/branches/tor-0_1_2-patches/
tor/branches/tor-0_1_2-patches/ChangeLog
tor/branches/tor-0_1_2-patches/doc/TODO.012
tor/branches/tor-0_1_2-patches/src/or/connection.c
Log:
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.
Property changes on: tor/branches/tor-0_1_2-patches
___________________________________________________________________
svk:merge ticket from /tor/012 [r15762] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/branches/tor-0_1_2-patches/ChangeLog
===================================================================
--- tor/branches/tor-0_1_2-patches/ChangeLog 2007-10-14 08:48:51 UTC (rev 11926)
+++ tor/branches/tor-0_1_2-patches/ChangeLog 2007-10-14 08:48:54 UTC (rev 11927)
@@ -9,6 +9,10 @@
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
Modified: tor/branches/tor-0_1_2-patches/doc/TODO.012
===================================================================
--- tor/branches/tor-0_1_2-patches/doc/TODO.012 2007-10-14 08:48:51 UTC (rev 11926)
+++ tor/branches/tor-0_1_2-patches/doc/TODO.012 2007-10-14 08:48:54 UTC (rev 11927)
@@ -4,7 +4,7 @@
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.
Modified: tor/branches/tor-0_1_2-patches/src/or/connection.c
===================================================================
--- tor/branches/tor-0_1_2-patches/src/or/connection.c 2007-10-14 08:48:51 UTC (rev 11926)
+++ tor/branches/tor-0_1_2-patches/src/or/connection.c 2007-10-14 08:48:54 UTC (rev 11927)
@@ -2289,6 +2289,9 @@
{
tor_assert(conn);
+ if (conn->s < 0 || !conn->write_event)
+ return 0;
+
// log_fn(LOG_DEBUG,"entered. Socket %u.", conn->s);
switch (conn->type) {