[or-cvs] fix a bug in dns.c, note but don"t fix another one

Roger Dingledine arma at seul.org
Wed Apr 28 19:55:22 UTC 2004


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

Modified Files:
	connection_edge.c dns.c 
Log Message:
fix a bug in dns.c, note but don't fix another one


Index: connection_edge.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection_edge.c,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -d -r1.178 -r1.179
--- connection_edge.c	25 Apr 2004 22:48:47 -0000	1.178
+++ connection_edge.c	28 Apr 2004 19:55:20 -0000	1.179
@@ -834,6 +834,7 @@
         log_fn(LOG_WARN,"Advertised intro point '%s' is not known. Closing.", exitname);
         return -1;
       }
+      /* XXX if we failed, then refetch the descriptor */
       log_fn(LOG_INFO,"Chose %s as intro point for %s.", exitname, conn->rend_query);
     }
 

Index: dns.c
===================================================================
RCS file: /home/or/cvsroot/src/or/dns.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- dns.c	28 Apr 2004 19:35:12 -0000	1.79
+++ dns.c	28 Apr 2004 19:55:20 -0000	1.80
@@ -474,6 +474,7 @@
     }
     address[address_len] = 0; /* null terminate it */
 
+    /* XXX isn't this non-aligned uint32 going to cause problems? */
     switch (tor_lookup_hostname(address, (uint32_t*)answer+1)) {
       case 1:
         log_fn(LOG_INFO,"Could not resolve dest addr %s (transient).",address);
@@ -482,9 +483,11 @@
       case -1:
         log_fn(LOG_INFO,"Could not resolve dest addr %s (permanent).",address);
         answer[0] = DNS_RESOLVE_FAILED_PERMANENT;
+        break;
       case 0:
         log_fn(LOG_INFO,"Resolved address '%s'.",address);
         answer[0] = DNS_RESOLVE_SUCCEEDED;
+        break;
     }
     if(write_all(fd, answer, 5, 1) != 5) {
       log_fn(LOG_ERR,"writing answer failed. Child exiting.");



More information about the tor-commits mailing list