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

[or-cvs] r8328: Fix dns_cancel_pending_resolve() to realize pending resolves (in tor/trunk: . src/or)



Author: nickm
Date: 2006-09-06 16:22:05 -0400 (Wed, 06 Sep 2006)
New Revision: 8328

Modified:
   tor/trunk/
   tor/trunk/src/or/dns.c
Log:
 r8729@Kushana:  nickm | 2006-09-06 16:20:40 -0400
 Fix dns_cancel_pending_resolve() to realize pending resolves have expiry times, and should not be freed except when they fall off the pqueue.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r8729] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c	2006-09-06 08:42:20 UTC (rev 8327)
+++ tor/trunk/src/or/dns.c	2006-09-06 20:22:05 UTC (rev 8328)
@@ -638,7 +638,6 @@
     return;
   }
   tor_assert(resolve->pending_connections);
-  tor_assert(! resolve->expire);
 
   /* mark all pending connections to fail */
   log_debug(LD_EXIT,
@@ -670,8 +669,8 @@
             tmp ? tmp->address : "NULL", (void*)tmp);
   }
   tor_assert(tmp == resolve);
-  resolve->magic = 0xABABABAB;
-  tor_free(resolve);
+
+  resolve->state = CACHE_STATE_DONE;
 }
 
 /** Helper: adds an entry to the DNS cache mapping <b>address</b> to the ipv4