[or-cvs] bugfix: actually remember the answer in the cache :)

Roger Dingledine arma at seul.org
Sun Feb 16 02:05:27 UTC 2003


Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or

Modified Files:
	dns.c 
Log Message:
bugfix: actually remember the answer in the cache :)


Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dns.c	14 Feb 2003 07:53:54 -0000	1.4
+++ dns.c	16 Feb 2003 02:05:24 -0000	1.5
@@ -543,6 +543,7 @@
 
   assert(resolve->state == CACHE_STATE_PENDING);
 
+  resolve->answer = ntohl(answer);
   if(valid)
     resolve->state = CACHE_STATE_VALID;
   else
@@ -550,7 +551,7 @@
 
   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;
     }



More information about the tor-commits mailing list