aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-13 21:18:56 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-13 21:18:56 +0000
commita10ccac9cb78bebf480f7e17b63998402fbee3e5 (patch)
tree936c286e4d8e9261fcd1fbf7056af463975eb5d2 /src/or/connection_edge.c
parentc3281759bad92cd5fb4d184526f64bc4f8e8a7d8 (diff)
downloadtor-a10ccac9cb78bebf480f7e17b63998402fbee3e5.tar.gz
tor-a10ccac9cb78bebf480f7e17b63998402fbee3e5.zip
r11797@catbus: nickm | 2007-02-13 16:17:40 -0500
Fix a longstanding dnsworker-related bug: when we decide to kill a DNS worker for having been in use too long, and we independently decide to close one of the exit connections waiting for that DNS worker (perhaps because we got an END relay cell), it was possible for us to try to double-free the connection. We were smart enough to detect this and assert, but not smart enough to fix this bug before now. This should resolve bug 390. Backport candidate. svn:r9581
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index aa5c02217e..56a3009457 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -175,8 +175,8 @@ connection_edge_destroy(uint16_t circ_id, edge_connection_t *conn)
/** Send a relay end cell from stream <b>conn</b> to conn's circuit,
* with a destination of cpath_layer. (If cpath_layer is NULL, the
- * destination is the circuit's origin.) Mark the relay end cell as
- * closing because of <b>reason</b>.
+ * destination is the circuit's origin.) Set the relay end cell's
+ * reason for closing as <b>reason</b>.
*
* Return -1 if this function has already been called on this conn,
* else return 0.
@@ -213,11 +213,11 @@ connection_edge_end(edge_connection_t *conn, char reason,
circ = circuit_get_by_edge_conn(conn);
if (circ && !circ->marked_for_close) {
- log_debug(LD_EDGE,"Marking conn (fd %d) and sending end.",conn->_base.s);
+ log_debug(LD_EDGE,"Sending end on conn (fd %d).",conn->_base.s);
connection_edge_send_command(conn, circ, RELAY_COMMAND_END,
payload, payload_len, cpath_layer);
} else {
- log_debug(LD_EDGE,"Marking conn (fd %d); no circ to send end.",
+ log_debug(LD_EDGE,"No circ to send end on conn (fd %d).",
conn->_base.s);
}