[or-cvs] r13492: Bugfix from Karsten: "Reversed r13439; v2 rendezvous descrip (in tor/trunk: . src/or)

nickm at seul.org nickm at seul.org
Wed Feb 13 16:23:28 UTC 2008


Author: nickm
Date: 2008-02-13 11:23:28 -0500 (Wed, 13 Feb 2008)
New Revision: 13492

Modified:
   tor/trunk/
   tor/trunk/ChangeLog
   tor/trunk/src/or/connection.c
Log:
 r18066 at catbus:  nickm | 2008-02-13 11:22:19 -0500
 Bugfix from Karsten: "Reversed r13439; v2 rendezvous descriptors were only re-fetched when a directory connection did not finish, not when a directory correctly replied with an error code like 404; bug found by nwf.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r18066] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/ChangeLog
===================================================================

Modified: tor/trunk/src/or/connection.c
===================================================================
--- tor/trunk/src/or/connection.c	2008-02-13 15:08:58 UTC (rev 13491)
+++ tor/trunk/src/or/connection.c	2008-02-13 16:23:28 UTC (rev 13492)
@@ -477,12 +477,15 @@
         /* 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 (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC)
         rend_client_desc_here(dir_conn->rend_query); /* give it a try */
+      /* If we were trying to fetch a v2 rend desc and did not succeed,
+       * retry as needed. (If a fetch is successful, the connection state
+       * is changed to DIR_PURPOSE_HAS_FETCHED_RENDDESC to mark that
+       * refetching is unnecessary.) */
+      if (conn->purpose == DIR_PURPOSE_FETCH_RENDDESC_V2)
+        rend_client_refetch_v2_renddesc(dir_conn->rend_query);
       break;
     case CONN_TYPE_OR:
       or_conn = TO_OR_CONN(conn);



More information about the tor-commits mailing list