summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-06-13 03:52:58 +0000
committerNick Mathewson <nickm@torproject.org>2008-06-13 03:52:58 +0000
commitbcde95509d5224a5e1f388bff1318c7b5f6f6a1b (patch)
treeeaa108f5533ada2900dba44d142a29282ba4cb79
parentb50206a9d2bc221bed91603289875834df22b58a (diff)
downloadtor-bcde95509d5224a5e1f388bff1318c7b5f6f6a1b.tar.gz
tor-bcde95509d5224a5e1f388bff1318c7b5f6f6a1b.zip
Actually reinstate errors that did not work on windows, and add a comment about reading the documentation of the S_CASE and E_CASE macros before adding new cases to the switch statements there.
svn:r15179
-rw-r--r--src/or/reasons.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/reasons.c b/src/or/reasons.c
index e66838a5a5..f261a87ad1 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -148,6 +148,9 @@ stream_end_reason_to_socks5_response(int reason)
uint8_t
errno_to_stream_end_reason(int e)
{
+ /* To add new errors here, find out if they exist on Windows, and if a WSA*
+ * equivalent exists on windows. Add a case, an S_CASE, or an E_CASE as
+ * appropriate. */
switch (e) {
case EPIPE:
return END_STREAM_REASON_DONE;
@@ -188,6 +191,9 @@ errno_to_stream_end_reason(int e)
const char *
orconn_end_reason_to_control_string(int r)
{
+ /* To add new errors here, find out if they exist on Windows, and if a WSA*
+ * equivalent exists on windows. Add a case, an S_CASE, or an E_CASE as
+ * appropriate. */
switch (r) {
case END_OR_CONN_REASON_DONE:
return "DONE";
@@ -252,8 +258,8 @@ errno_to_orconn_end_reason(int e)
return END_OR_CONN_REASON_DONE;
S_CASE(ENOTCONN):
S_CASE(ENETUNREACH):
-// case ENETDOWN: /* << somebody should look into the Windows equiv */
-// case EHOSTUNREACH:
+ S_CASE(ENETDOWN):
+ S_CASE(EHOSTUNREACH):
return END_OR_CONN_REASON_NO_ROUTE;
S_CASE(ECONNREFUSED):
return END_OR_CONN_REASON_REFUSED;