[or-cvs] if we run out of dnsworkers or fd"s, don"t send a mysterious

Roger Dingledine arma at seul.org
Fri Jan 28 05:59:20 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/0091/tor/src/or

Modified Files:
      Tag: tor-0_0_9-patches
	dns.c 
Log Message:
if we run out of dnsworkers or fd's, don't send a mysterious
"your tor-resolve request failed" cell back unless they actually
did a tor-resolve request.


Index: dns.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/dns.c,v
retrieving revision 1.126.2.3
retrieving revision 1.126.2.4
diff -u -d -r1.126.2.3 -r1.126.2.4
--- dns.c	4 Jan 2005 11:35:28 -0000	1.126.2.3
+++ dns.c	28 Jan 2005 05:59:18 -0000	1.126.2.4
@@ -280,8 +280,9 @@
 
   if (!dnsconn) {
     log_fn(LOG_WARN,"no idle dns workers. Failing.");
+    if (exitconn->purpose == EXIT_PURPOSE_RESOLVE)
+      send_resolved_cell(exitconn, RESOLVED_TYPE_ERROR_TRANSIENT);
     dns_cancel_pending_resolve(exitconn->address);
-    send_resolved_cell(exitconn, RESOLVED_TYPE_ERROR_TRANSIENT);
     return -1;
   }
 



More information about the tor-commits mailing list