diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-04-11 17:07:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-04-11 17:07:45 +0000 |
commit | c024745bd4a207bf68d80c1527029d2ca3a8732e (patch) | |
tree | 1d0609f1b7d8a3039dae25bbd93f8a2a8872ab8f /src/or/dns.c | |
parent | da7bd22a0e57c16851db47ef111b564474413d06 (diff) | |
download | tor-c024745bd4a207bf68d80c1527029d2ca3a8732e.tar tor-c024745bd4a207bf68d80c1527029d2ca3a8732e.tar.gz |
Cosmetic patch for arma's fix for The Bug: Don't set the state to
RESOLVEFAILED if the resolve didn't fail; set it to CONNECTING
instead.
svn:r1590
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index fad3af1a5..cfa395610 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -378,14 +378,16 @@ static void dns_found_answer(char *address, uint32_t addr, char outcome) { assert_connection_ok(pend->conn,time(NULL)); pend->conn->addr = resolve->addr; - /* prevent double-remove. (this may get changed below.) */ - pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED; if(resolve->state == CACHE_STATE_FAILED) { pendconn = pend->conn; /* don't pass complex things to the connection_mark_for_close macro */ + /* prevent double-remove. */ + pend->conn->state = EXIT_CONN_STATE_RESOLVEFAILED; connection_mark_for_close(pendconn, END_STREAM_REASON_RESOLVEFAILED); } else { + /* prevent double-remove. */ + pend->conn->state = EXIT_CONN_STATE_CONNECTING; connection_exit_connect(pend->conn); } resolve->pending_connections = pend->next; |