diff options
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 6d98c89d8..3e862ce69 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -118,9 +118,15 @@ static void purge_expired_resolves(uint32_t now) { log(LOG_DEBUG,"Forgetting old cached resolve (expires %lu)", (unsigned long)resolve->expire); if (resolve->state == CACHE_STATE_PENDING) { log_fn(LOG_WARN,"Bug: Expiring a dns resolve that's still pending. Forgot to cull it?"); +#ifdef TOR_FRAGILE + tor_assert(0); +#endif } if (resolve->pending_connections) { log_fn(LOG_WARN, "Closing pending connections on expiring DNS resolve!"); +#ifdef TOR_FRAGILE + tor_assert(0); +#endif while (resolve->pending_connections) { pend = resolve->pending_connections; resolve->pending_connections = pend->next; @@ -401,6 +407,9 @@ void dns_cancel_pending_resolve(char *address) { 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); +#ifdef TOR_FRAGILE + tor_assert(0); +#endif return; } tor_assert(resolve->pending_connections); @@ -596,6 +605,9 @@ int connection_dns_process_inbuf(connection_t *conn) { if (conn->state != DNSWORKER_STATE_BUSY && buf_datalen(conn->inbuf)) { log_fn(LOG_WARN,"Bug: read data from an idle dns worker. Please report."); +#ifdef TOR_FRAGILE + tor_assert(0); +#endif return 0; } if (buf_datalen(conn->inbuf) < 5) /* entire answer available? */ |