diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-02-28 04:11:53 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-02-28 04:11:53 +0000 |
commit | 4e89c6661aefc78417d0ac152a824c5ae4d9eb7d (patch) | |
tree | 1eb95d0deb15c9f05db49c3eca45047c789d4c6e /src/or/connection_edge.c | |
parent | 88e222ff76e3643b20589dde8f0002ce8c559dc0 (diff) | |
download | tor-4e89c6661aefc78417d0ac152a824c5ae4d9eb7d.tar tor-4e89c6661aefc78417d0ac152a824c5ae4d9eb7d.tar.gz |
Push responsibility for connection marking down as far as possible; have only a close path; add some missing end cells; change return conventions a little.
svn:r1149
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 9ab1b7c11..3a8f81b1d 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -305,10 +305,10 @@ int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, connection conn->done_sending = 1; shutdown(conn->s, 1); /* XXX check return; refactor NM */ if (conn->done_receiving) { - connection_mark_for_close(conn, 0); + connection_mark_for_close(conn, END_STREAM_REASON_DONE); } #else - connection_mark_for_close(conn, 0); + connection_mark_for_close(conn, END_STREAM_REASON_DONE); #endif return 0; case RELAY_COMMAND_EXTEND: @@ -395,6 +395,7 @@ int connection_edge_finished_flushing(connection_t *conn) { if(!ERRNO_CONN_EINPROGRESS(errno)) { /* yuck. kill it. */ log_fn(LOG_DEBUG,"in-progress exit connect failed. Removing."); + connection_mark_for_close(conn, END_STREAM_REASON_CONNECTFAILED); return -1; } else { log_fn(LOG_DEBUG,"in-progress exit connect still waiting."); |