[tor-commits] [tor/master] For missing transport, say "PT_MISSING" not "NO_ROUTE"

nickm at torproject.org nickm at torproject.org
Tue Apr 8 02:20:48 UTC 2014


commit 90341b4852bf88f1fdf9fd150fa2f5c47f88b2cb
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Apr 7 13:44:22 2014 -0400

    For missing transport, say "PT_MISSING" not "NO_ROUTE"
---
 src/or/connection_or.c |    2 +-
 src/or/or.h            |    3 ++-
 src/or/reasons.c       |    2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index 01ff4dc..6572a91 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1198,7 +1198,7 @@ connection_or_connect(const tor_addr_t *_addr, uint16_t port,
 
       control_event_bootstrap_problem(
                                 "Can't connect to bridge",
-                                END_OR_CONN_REASON_NO_ROUTE,
+                                END_OR_CONN_REASON_PT_MISSING,
                                 conn);
 
     } else {
diff --git a/src/or/or.h b/src/or/or.h
index 38ab176..1b35c1f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -604,7 +604,8 @@ typedef enum {
 #define END_OR_CONN_REASON_NO_ROUTE       6 /* no route to host/net */
 #define END_OR_CONN_REASON_IO_ERROR       7 /* read/write error */
 #define END_OR_CONN_REASON_RESOURCE_LIMIT 8 /* sockets, buffers, etc */
-#define END_OR_CONN_REASON_MISC           9
+#define END_OR_CONN_REASON_PT_MISSING     9 /* PT failed or not available */
+#define END_OR_CONN_REASON_MISC           10
 
 /* Reasons why we (or a remote OR) might close a stream. See tor-spec.txt for
  * documentation of these.  The values must match. */
diff --git a/src/or/reasons.c b/src/or/reasons.c
index 0674474..750e89b 100644
--- a/src/or/reasons.c
+++ b/src/or/reasons.c
@@ -231,6 +231,8 @@ orconn_end_reason_to_control_string(int r)
       return "RESOURCELIMIT";
     case END_OR_CONN_REASON_MISC:
       return "MISC";
+    case END_OR_CONN_REASON_PT_MISSING:
+      return "PT_MISSING";
     case 0:
       return "";
     default:





More information about the tor-commits mailing list