From: Roger Dingledine Date: Tue, 4 Jan 2005 06:21:06 +0000 (+0000) Subject: bandaid: make Giorgos Pallas's dns assert bug not actually crash on him. X-Git-Tag: debian-version-0.0.9.2-1~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba7c74e7425f53490e7becfbf47cbe686448ad7e;p=thirdparty%2Ftor.git bandaid: make Giorgos Pallas's dns assert bug not actually crash on him. one day we should try to figure out what's actually going on here. svn:r3280 --- diff --git a/src/or/dns.c b/src/or/dns.c index 75a45170cf..ac24de2433 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -396,6 +396,11 @@ void dns_cancel_pending_resolve(char *address) { return; } + if (!resolve->pending_connections) { + /* XXX this should never trigger, but sometimes it does */ + log_fn(LOG_WARN,"Bug: Address '%s' is pending but has no pending connections!", address); + return; + } tor_assert(resolve->pending_connections); /* mark all pending connections to fail */