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

[or-cvs] r16848: {tor} Apply patch for bug 814. (tor/branches/hidserv-design-changes/src/or)



Author: kloesing
Date: 2008-09-11 12:45:24 -0400 (Thu, 11 Sep 2008)
New Revision: 16848

Modified:
   tor/branches/hidserv-design-changes/src/or/rendclient.c
Log:
Apply patch for bug 814.

Modified: tor/branches/hidserv-design-changes/src/or/rendclient.c
===================================================================
--- tor/branches/hidserv-design-changes/src/or/rendclient.c	2008-09-11 16:15:39 UTC (rev 16847)
+++ tor/branches/hidserv-design-changes/src/or/rendclient.c	2008-09-11 16:45:24 UTC (rev 16848)
@@ -686,9 +686,14 @@
           connection_mark_unattached_ap(conn, END_STREAM_REASON_CANT_ATTACH);
       }
     } else { /* 404, or fetch didn't get that far */
-      log_notice(LD_REND,"Closing stream for '%s.onion': hidden service is "
-                 "unavailable (try again later).", safe_str(query));
-      connection_mark_unattached_ap(conn, END_STREAM_REASON_RESOLVEFAILED);
+      /* Unless there are requests for another descriptor version pending,
+       * close the connection. */
+      if (!connection_get_by_type_state_rendquery(CONN_TYPE_DIR, 0, query,
+                                                  -1)) {
+        log_notice(LD_REND,"Closing stream for '%s.onion': hidden service "
+                   "is unavailable (try again later).", safe_str(query));
+        connection_mark_unattached_ap(conn, END_STREAM_REASON_RESOLVEFAILED);
+      }
     }
   });
 }