diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-02-07 06:54:27 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-02-07 06:54:27 +0000 |
commit | 071738c2d5ef08131633631648c8952840e7c1eb (patch) | |
tree | 3b3c141af42e5ce09ee41d56e96077887a52396c /src/or/relay.c | |
parent | 026c11c42e30258d273f6ecc41ae1634981b84b3 (diff) | |
download | tor-071738c2d5ef08131633631648c8952840e7c1eb.tar.gz tor-071738c2d5ef08131633631648c8952840e7c1eb.zip |
r11673@catbus: nickm | 2007-02-06 14:40:07 -0500
Report stream end events where a resolve succeeded or where we got a socks protocol error correctly, rather than calling both of them "INTERNAL". Turn ALREADY_SOCKS_REPLIED into a flag rather than a reason. This will help debug 367 part 2 a little.
svn:r9511
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index 559d1f6433..018d16e293 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -584,7 +584,7 @@ connection_edge_end_reason_str(int reason) socks5_reply_status_t connection_edge_end_reason_socks5_response(int reason) { - switch (reason) { + switch (reason & END_STREAM_REASON_MASK) { case 0: return SOCKS5_SUCCEEDED; case END_STREAM_REASON_MISC: @@ -612,8 +612,6 @@ connection_edge_end_reason_socks5_response(int reason) case END_STREAM_REASON_TORPROTOCOL: return SOCKS5_GENERAL_ERROR; - case END_STREAM_REASON_ALREADY_SOCKS_REPLIED: - return SOCKS5_SUCCEEDED; /* never used */ case END_STREAM_REASON_CANT_ATTACH: return SOCKS5_GENERAL_ERROR; case END_STREAM_REASON_NET_UNREACHABLE: @@ -922,7 +920,8 @@ connection_edge_process_relay_cell_not_open( cell->payload+RELAY_HEADER_SIZE+2, /*answer*/ ttl); connection_mark_unattached_ap(conn, - END_STREAM_REASON_ALREADY_SOCKS_REPLIED); + END_STREAM_REASON_DONE | + END_STREAM_REASON_FLAG_ALREADY_SOCKS_REPLIED); return 0; } |