summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-20 17:54:48 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-20 17:54:48 +0000
commitb27cb38dee3aa024e191a974bcf2801d4e87c0a5 (patch)
treea08aa6d0cd08cea79e981975cb9b75ed803cce87 /src/or/main.c
parent8e94097edb05b204cff7772588a3376507b3fd0b (diff)
downloadtor-b27cb38dee3aa024e191a974bcf2801d4e87c0a5.tar.gz
tor-b27cb38dee3aa024e191a974bcf2801d4e87c0a5.zip
r9307@Kushana: nickm | 2006-10-20 13:53:54 -0400
Have connection_about_to_close use an end_reason field in edge_connection_t to tell what reason to tell the controller for closing the stream. Set end_reason in connection_edge_end, connection_mark_unattached_ap, and everwhere we set edge_has_sent_end. Add a changelog entry. svn:r8779
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 81b555c6cf..b51028ca80 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -447,6 +447,9 @@ conn_write_callback(int fd, short events, void *_conn)
tor_fragile_assert();
if (CONN_IS_EDGE(conn)) {
/* otherwise we cry wolf about duplicate close */
+ edge_connection_t *edge_conn = TO_EDGE_CONN(conn);
+ if (!edge_conn->end_reason)
+ edge_conn->end_reason = END_STREAM_REASON_INTERNAL;
conn->edge_has_sent_end = 1;
}
/* XXX do we need a close-immediate here, so we don't try to flush? */