[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r9467: Fix a bug in our assertions related to removing recently-com (in tor/trunk: . src/or)
- To: or-cvs@xxxxxxxxxxxxx
- Subject: [or-cvs] r9467: Fix a bug in our assertions related to removing recently-com (in tor/trunk: . src/or)
- From: nickm@xxxxxxxx
- Date: Tue, 30 Jan 2007 17:44:26 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Tue, 30 Jan 2007 17:44:34 -0500
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-cvs@xxxxxxxxxxxxx
Author: nickm
Date: 2007-01-30 17:44:24 -0500 (Tue, 30 Jan 2007)
New Revision: 9467
Modified:
tor/trunk/
tor/trunk/src/or/dns.c
Log:
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.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r11610] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2007-01-30 22:19:41 UTC (rev 9466)
+++ tor/trunk/src/or/dns.c 2007-01-30 22:44:24 UTC (rev 9467)
@@ -324,8 +324,8 @@
/* 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);