aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-06 20:22:05 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-06 20:22:05 +0000
commite10e9213868ffba8d62f550457a4620fed87c149 (patch)
tree69ba05ad8abfcddf79222bd4bba13d5e95096908 /src/or
parent365ccf0742b597bc9b28be30f0af6581a734d019 (diff)
downloadtor-e10e9213868ffba8d62f550457a4620fed87c149.tar.gz
tor-e10e9213868ffba8d62f550457a4620fed87c149.zip
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. svn:r8328
Diffstat (limited to 'src/or')
-rw-r--r--src/or/dns.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 7ef3d54326..530b5e8043 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -638,7 +638,6 @@ dns_cancel_pending_resolve(char *address)
return;
}
tor_assert(resolve->pending_connections);
- tor_assert(! resolve->expire);
/* mark all pending connections to fail */
log_debug(LD_EXIT,
@@ -670,8 +669,8 @@ dns_cancel_pending_resolve(char *address)
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