[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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;
     }