aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2003-02-16 02:05:24 +0000
committerRoger Dingledine <arma@torproject.org>2003-02-16 02:05:24 +0000
commit8c136b3a06de2aad8523ae68fa7e94cbfbf51f94 (patch)
tree7aa3a79397638934d1b468268dbd3086f238bacc
parent3cf02a88f49c5fc01fd13fc910c4d5c5ea4ac098 (diff)
downloadtor-8c136b3a06de2aad8523ae68fa7e94cbfbf51f94.tar
tor-8c136b3a06de2aad8523ae68fa7e94cbfbf51f94.tar.gz
bugfix: actually remember the answer in the cache :)
svn:r159
-rw-r--r--src/or/dns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index fc5575cb4..d0f65e0ff 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -543,6 +543,7 @@ static int dns_found_answer(char *question, uint32_t answer, uint32_t valid) {
assert(resolve->state == CACHE_STATE_PENDING);
+ resolve->answer = ntohl(answer);
if(valid)
resolve->state = CACHE_STATE_VALID;
else
@@ -550,7 +551,7 @@ static int dns_found_answer(char *question, uint32_t answer, uint32_t valid) {
while(resolve->pending_connections) {
pend = resolve->pending_connections;
- pend->conn->addr = ntohl(answer);
+ pend->conn->addr = resolve->answer;
if(resolve->state == CACHE_STATE_FAILED || connection_exit_connect(pend->conn) < 0) {
pend->conn->marked_for_close = 1;
}