[or-cvs] backport minimal fixes for the assert triggers
Roger Dingledine
arma at seul.org
Wed Mar 23 02:55:35 UTC 2005
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or
Modified Files:
Tag: tor-0_0_9-patches
connection.c connection_edge.c
Log Message:
backport minimal fixes for the assert triggers
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.310.2.6
retrieving revision 1.310.2.7
diff -u -d -r1.310.2.6 -r1.310.2.7
--- connection.c 21 Mar 2005 21:51:17 -0000 1.310.2.6
+++ connection.c 23 Mar 2005 02:55:33 -0000 1.310.2.7
@@ -1485,8 +1485,10 @@
tor_assert(conn->socks_request);
if (conn->state == AP_CONN_STATE_OPEN) {
tor_assert(conn->socks_request->has_finished);
- tor_assert(conn->cpath_layer);
- assert_cpath_layer_ok(conn->cpath_layer);
+ if (!conn->marked_for_close) {
+ tor_assert(conn->cpath_layer);
+ assert_cpath_layer_ok(conn->cpath_layer);
+ }
}
} else {
tor_assert(!conn->socks_request);
Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.264.2.9
retrieving revision 1.264.2.10
diff -u -d -r1.264.2.9 -r1.264.2.10
--- connection_edge.c 1 Mar 2005 22:13:04 -0000 1.264.2.9
+++ connection_edge.c 23 Mar 2005 02:55:33 -0000 1.264.2.10
@@ -111,6 +111,7 @@
conn->has_sent_end = 1; /* we're closing the circuit, nothing to send to */
connection_mark_for_close(conn);
conn->hold_open_until_flushed = 1;
+ conn->cpath_layer = NULL;
return 0;
}
More information about the tor-commits
mailing list