summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-07-23 14:07:26 +0000
committerNick Mathewson <nickm@torproject.org>2008-07-23 14:07:26 +0000
commitcc46b232485b192d988bc6ef9ffbfcb88e630491 (patch)
treed1f5875f1f48a3d72bbc58cacb903998d3460d4e /src
parent087094961b0ba75435fe5bdfab0788b0e3b5293c (diff)
downloadtor-cc46b232485b192d988bc6ef9ffbfcb88e630491.tar.gz
tor-cc46b232485b192d988bc6ef9ffbfcb88e630491.zip
r17308@aud-055: nickm | 2008-07-23 15:57:41 +0200
In connection_edge_destroy, send a stream status control event when we have an AP connection. Previously, we would send an event when the connection was AP and non-AP at the same time. This didn't work so well. Patch from Anonymous Remailer (Austria). Backport candidate. svn:r16143
Diffstat (limited to 'src')
-rw-r--r--src/or/connection_edge.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 96a9bb6c89..aee22eb0cb 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -160,14 +160,14 @@ connection_edge_destroy(uint16_t circ_id, edge_connection_t *conn)
"CircID %d: At an edge. Marking connection for close.", circ_id);
if (conn->_base.type == CONN_TYPE_AP) {
connection_mark_unattached_ap(conn, END_STREAM_REASON_DESTROY);
+ control_event_stream_status(conn, STREAM_EVENT_CLOSED,
+ END_STREAM_REASON_DESTROY);
+ conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
} else {
/* closing the circuit, nothing to send an END to */
conn->_base.edge_has_sent_end = 1;
conn->end_reason = END_STREAM_REASON_DESTROY;
conn->end_reason |= END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED;
- if (conn->_base.type == CONN_TYPE_AP)
- control_event_stream_status(conn, STREAM_EVENT_CLOSED,
- END_STREAM_REASON_DESTROY);
connection_mark_for_close(TO_CONN(conn));
conn->_base.hold_open_until_flushed = 1;
}