diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-08-05 20:08:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-08-05 20:08:19 +0000 |
commit | 960a0f0a994ba23480e14ffe5179160194fd9616 (patch) | |
tree | 250494775699fda2f0f543a350b02e89c5a77a03 /src/or/dirserv.c | |
parent | 750bb795ac1fcb5b76b6488690400c77fbff0a3f (diff) | |
download | tor-960a0f0a994ba23480e14ffe5179160194fd9616.tar.gz tor-960a0f0a994ba23480e14ffe5179160194fd9616.zip |
r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you.
svn:r16435
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index e43c57029d..e59b84d90b 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2770,8 +2770,9 @@ dirserv_test_reachability(time_t now, int try_all) static char ctr = 0; int bridge_auth = authdir_mode_bridge(get_options()); - SMARTLIST_FOREACH(rl->routers, routerinfo_t *, router, { + SMARTLIST_FOREACH_BEGIN(rl->routers, routerinfo_t *, router) { const char *id_digest = router->cache_info.identity_digest; + tor_addr_t router_addr; if (router_is_me(router)) continue; if (bridge_auth && router->purpose != ROUTER_PURPOSE_BRIDGE) @@ -2784,10 +2785,10 @@ dirserv_test_reachability(time_t now, int try_all) /* Remember when we started trying to determine reachability */ if (!router->testing_since) router->testing_since = now; - connection_or_connect(router->addr, router->or_port, - id_digest); + tor_addr_from_ipv4h(&router_addr, router->addr); + connection_or_connect(&router_addr, router->or_port, id_digest); } - }); + } SMARTLIST_FOREACH_END(router); if (!try_all) /* increment ctr */ ctr = (ctr + 1) % 128; } |