aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-01-30 22:44:24 +0000
committerNick Mathewson <nickm@torproject.org>2007-01-30 22:44:24 +0000
commit49b5e5cf9c3dcfd33081a09394854586f4dde2dd (patch)
treef2304e3e03403d667862a45980c267c73acd4083 /src
parent76f896e7145ac85b354ad603794f569b20ca85c8 (diff)
downloadtor-49b5e5cf9c3dcfd33081a09394854586f4dde2dd.tar
tor-49b5e5cf9c3dcfd33081a09394854586f4dde2dd.tar.gz
r11610@catbus: nickm | 2007-01-30 17:44:02 -0500
Fix a bug in our assertions related to removing recently-completed DNS lookup attempts on exit. It is okay to find a cache entry with the same name as a DONE entry, so long it is not the same struct as the DONE entry. svn:r9467
Diffstat (limited to 'src')
-rw-r--r--src/or/dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 1155f5999..40897d307 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -324,8 +324,8 @@ dns_free_all(void)
/* XXXX012 The hash lookups here could be quite slow; remove them
* once we're happy. */
if (res->state == CACHE_STATE_DONE) {
- cached_resolve_t *removed = HT_REMOVE(cache_map, &cache_root, res);
- tor_assert(!removed);
+ cached_resolve_t *found = HT_FIND(cache_map, &cache_root, res);
+ tor_assert(!found || found != res);
_free_cached_resolve(res);
} else {
cached_resolve_t *found = HT_FIND(cache_map, &cache_root, res);