diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-08-03 16:46:28 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-08-03 16:46:28 +0200 |
commit | 150ed553dfce93c6dd32ee59b8df0422e04cd699 (patch) | |
tree | f9842d0d42ab7c72bab0326f0cd9730710c23d72 /src/or/reasons.c | |
parent | b8aa14a39b2f96edad8ca0b5a9ea5be218837ce0 (diff) | |
download | tor-150ed553dfce93c6dd32ee59b8df0422e04cd699.tar.gz tor-150ed553dfce93c6dd32ee59b8df0422e04cd699.zip |
Introduce END_STREAM_REASON_NOROUTE
Diffstat (limited to 'src/or/reasons.c')
-rw-r--r-- | src/or/reasons.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/reasons.c b/src/or/reasons.c index 27abb790df..0679119b6c 100644 --- a/src/or/reasons.c +++ b/src/or/reasons.c @@ -26,6 +26,7 @@ stream_end_reason_to_control_string(int reason) case END_STREAM_REASON_DESTROY: return "DESTROY"; case END_STREAM_REASON_DONE: return "DONE"; case END_STREAM_REASON_TIMEOUT: return "TIMEOUT"; + case END_STREAM_REASON_NOROUTE: "return "NOROUTE"; case END_STREAM_REASON_HIBERNATING: return "HIBERNATING"; case END_STREAM_REASON_INTERNAL: return "INTERNAL"; case END_STREAM_REASON_RESOURCELIMIT: return "RESOURCELIMIT"; @@ -60,6 +61,7 @@ stream_end_reason_to_string(int reason) case END_STREAM_REASON_DESTROY: return "destroyed"; case END_STREAM_REASON_DONE: return "closed normally"; case END_STREAM_REASON_TIMEOUT: return "gave up (timeout)"; + case END_STREAM_REASON_NOROUTE: return "no route to host"; case END_STREAM_REASON_HIBERNATING: return "server is hibernating"; case END_STREAM_REASON_INTERNAL: return "internal error at server"; case END_STREAM_REASON_RESOURCELIMIT: return "server out of resources"; @@ -102,6 +104,8 @@ stream_end_reason_to_socks5_response(int reason) return SOCKS5_SUCCEEDED; case END_STREAM_REASON_TIMEOUT: return SOCKS5_TTL_EXPIRED; + case END_STREAM_REASON_NOROUTE: + return SOCKS5_HOST_UNREACHABLE; case END_STREAM_REASON_RESOURCELIMIT: return SOCKS5_GENERAL_ERROR; case END_STREAM_REASON_HIBERNATING: @@ -161,8 +165,9 @@ errno_to_stream_end_reason(int e) E_CASE(EACCES): S_CASE(ENOTCONN): S_CASE(ENETUNREACH): - E_CASE(EHOSTUNREACH): return END_STREAM_REASON_INTERNAL; + E_CASE(EHOSTUNREACH): + return END_STREAM_REASON_NOROUTE; S_CASE(ECONNREFUSED): return END_STREAM_REASON_CONNECTREFUSED; S_CASE(ECONNRESET): |