aboutsummaryrefslogtreecommitdiff
path: root/src/or/control.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-02-07 06:54:22 +0000
committerNick Mathewson <nickm@torproject.org>2007-02-07 06:54:22 +0000
commit026c11c42e30258d273f6ecc41ae1634981b84b3 (patch)
treebebae1ca59a55cabe46291b0db9e3c2fcb65d612 /src/or/control.c
parente7f558bd27778ed7c499220af4db57b808717403 (diff)
downloadtor-026c11c42e30258d273f6ecc41ae1634981b84b3.tar.gz
tor-026c11c42e30258d273f6ecc41ae1634981b84b3.zip
r11672@catbus: nickm | 2007-02-06 14:16:56 -0500
Fix third case of bug 367: make circuit get sent along with END_STREAM_REASON_DESTROY stream CLOSED events. svn:r9510
Diffstat (limited to 'src/or/control.c')
-rw-r--r--src/or/control.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c
index cbea14f22c..402ca267d8 100644
--- a/src/or/control.c
+++ b/src/or/control.c
@@ -3140,7 +3140,7 @@ write_stream_target_to_buf(edge_connection_t *conn, char *buf, size_t len)
static const char *
stream_end_reason_to_string(int reason)
{
- reason &= ~END_CIRC_REASON_FLAG_REMOTE;
+ reason &= END_STREAM_REASON_MASK;
switch (reason) {
case END_STREAM_REASON_MISC: return "MISC";
case END_STREAM_REASON_RESOLVEFAILED: return "RESOLVEFAILED";
@@ -3179,6 +3179,10 @@ control_event_stream_status(edge_connection_t *conn, stream_status_event_t tp,
if (!EVENT_IS_INTERESTING(EVENT_STREAM_STATUS))
return 0;
+ if (tp == STREAM_EVENT_CLOSED &&
+ (reason_code & END_STREAM_REASON_FLAG_ALREADY_SENT_CLOSED))
+ return 0;
+
write_stream_target_to_buf(conn, buf, sizeof(buf));
if (EVENT_IS_INTERESTING0(EVENT_STREAM_STATUS)) {
len = strlen(buf);