diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-07-21 22:02:58 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-07-21 22:02:58 +0000 |
commit | 64c14d8ce33295ea800e5eb4cd9f702ae87765b8 (patch) | |
tree | 9791fd234a5d4896edc035bb2a1d452cc9bc3be0 /src/or/dns.c | |
parent | 08a4114abf4b933f9e58f83bcdbdd45c430c5a1e (diff) | |
download | tor-64c14d8ce33295ea800e5eb4cd9f702ae87765b8.tar.gz tor-64c14d8ce33295ea800e5eb4cd9f702ae87765b8.zip |
These asserts will either cause spurious crashes or help debug the pend->conn->s == -1 issue.
svn:r6803
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |