[or-cvs] fix the other half of the pipe race
Roger Dingledine
arma at seul.org
Tue Dec 7 16:37:34 UTC 2004
Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or
Modified Files:
connection.c connection_edge.c
Log Message:
fix the other half of the pipe race
Index: connection.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection.c,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -d -r1.308 -r1.309
--- connection.c 4 Dec 2004 07:13:37 -0000 1.308
+++ connection.c 7 Dec 2004 16:37:32 -0000 1.309
@@ -236,6 +236,8 @@
if (conn->socks_request->has_finished == 0) {
log_fn(LOG_INFO,"Cleaning up AP -- sending socks reject.");
conn->hold_open_until_flushed = 1;
+ /* XXX this socks_reply never gets sent, since conn
+ * gets removed right after this function finishes. */
connection_ap_handshake_socks_reply(conn, NULL, 0, -1);
conn->socks_request->has_finished = 1;
} else {
Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -d -r1.261 -r1.262
--- connection_edge.c 6 Dec 2004 06:14:45 -0000 1.261
+++ connection_edge.c 7 Dec 2004 16:37:32 -0000 1.262
@@ -45,9 +45,9 @@
/* only mark it if not already marked. it's possible to
* get the 'end' right around when the client hangs up on us. */
connection_mark_for_close(conn);
+ conn->hold_open_until_flushed = 1; /* just because we shouldn't read
+ doesn't mean we shouldn't write */
}
- conn->hold_open_until_flushed = 1; /* just because we shouldn't read
- doesn't mean we shouldn't write */
return 0;
#endif
}
More information about the tor-commits
mailing list