[or-cvs] simplify when we"re picking a default address for

arma at seul.org arma at seul.org
Sat Mar 18 22:54:10 UTC 2006


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

Modified Files:
	connection_edge.c 
Log Message:
simplify when we're picking a default address for
when people ask for "serifos.exit".


Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.387
retrieving revision 1.388
diff -u -p -d -r1.387 -r1.388
--- connection_edge.c	17 Mar 2006 04:43:37 -0000	1.387
+++ connection_edge.c	18 Mar 2006 22:54:08 -0000	1.388
@@ -995,15 +995,12 @@ connection_ap_handshake_rewrite_and_atta
         return -1;
       }
     } else {
-      struct in_addr in;
       routerinfo_t *r;
       conn->chosen_exit_name = tor_strdup(socks->address);
       r = router_get_by_nickname(conn->chosen_exit_name, 1);
       *socks->address = 0;
       if (r) {
-        /* XXXX Should this use server->address instead? */
-        in.s_addr = htonl(r->addr);
-        strlcpy(socks->address, inet_ntoa(in), sizeof(socks->address));
+        strlcpy(socks->address, r->address, sizeof(socks->address));
       } else {
         log_warn(LD_APP,
                  "Unrecognized server in exit address '%s.exit'. Refusing.",



More information about the tor-commits mailing list