[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r13439: Re-fetch v2 rendezvous descriptor only when first try failed (tor/trunk/src/or)



Author: nickm
Date: 2008-02-08 21:51:20 -0500 (Fri, 08 Feb 2008)
New Revision: 13439

Modified:
   tor/trunk/src/or/connection.c
Log:
Re-fetch v2 rendezvous descriptor only when first try failed.  Patch from karsten.

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-02-09 02:46:01 UTC (rev 13438)
+++ tor/trunk/src/or/connection.c	2008-02-09 02:51:20 UTC (rev 13439)
@@ -477,12 +477,12 @@
         /* It's a directory connection and connecting or fetching
          * failed: forget about this router, and maybe try again. */
         connection_dir_request_failed(dir_conn);
+        /* if we were trying to fetch a v2 rend desc, retry as needed */
+        if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC_V2)
+          rend_client_refetch_v2_renddesc(dir_conn->rend_query);
       }
-      /* if we were trying to fetch a rend desc, retry as needed */
       if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC)
-        rend_client_desc_here(dir_conn->rend_query);
-      if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC_V2)
-        rend_client_refetch_v2_renddesc(dir_conn->rend_query);
+        rend_client_desc_here(dir_conn->rend_query); /* give it a try */
       break;
     case CONN_TYPE_OR:
       or_conn = TO_OR_CONN(conn);