From: Nick Mathewson Date: Fri, 21 Jul 2006 22:02:58 +0000 (+0000) Subject: These asserts will either cause spurious crashes or help debug the pend->conn->s... X-Git-Tag: tor-0.1.1.23~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64c14d8ce33295ea800e5eb4cd9f702ae87765b8;p=thirdparty%2Ftor.git These asserts will either cause spurious crashes or help debug the pend->conn->s == -1 issue. svn:r6803 --- diff --git a/src/or/dns.c b/src/or/dns.c index fe02811695..d0545f19e9 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -551,6 +551,7 @@ dns_cancel_pending_resolve(char *address) pend = resolve->pending_connections; pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED; pendconn = pend->conn; + assert_connection_ok(pendconn, 0); tor_assert(pendconn->s == -1); if (!pendconn->marked_for_close) { connection_edge_end(pendconn, END_STREAM_REASON_RESOURCELIMIT, @@ -726,6 +727,7 @@ assign_to_dnsworker(connection_t *exitconn) unsigned char len; tor_assert(exitconn->state == EXIT_CONN_STATE_RESOLVING); + assert_connection_ok(exitconn, 0); tor_assert(exitconn->s == -1); /* respawn here, to be sure there are enough */ @@ -1200,7 +1202,6 @@ assert_resolve_ok(cached_resolve_t *resolve) tor_assert(resolve->magic == CACHED_RESOLVE_MAGIC); tor_assert(strlen(resolve->address) < MAX_ADDRESSLEN); tor_assert(! resolve->next || resolve->next->magic == CACHED_RESOLVE_MAGIC); - } static void