Make reachabiity test in dirserv.c use channel_t

This commit is contained in:
Andrea Shepard 2012-08-25 15:27:50 -07:00 committed by Andrea Shepard
parent e136f7ccb4
commit 35924435d2

View File

@ -8,6 +8,8 @@
#include "buffers.h" #include "buffers.h"
#include "config.h" #include "config.h"
#include "confparse.h" #include "confparse.h"
#include "channel.h"
#include "channeltls.h"
#include "connection.h" #include "connection.h"
#include "connection_or.h" #include "connection_or.h"
#include "control.h" #include "control.h"
@ -3410,7 +3412,7 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
log_debug(LD_OR,"Testing reachability of %s at %s:%u.", log_debug(LD_OR,"Testing reachability of %s at %s:%u.",
router->nickname, router->address, router->or_port); router->nickname, router->address, router->or_port);
tor_addr_from_ipv4h(&router_addr, router->addr); tor_addr_from_ipv4h(&router_addr, router->addr);
connection_or_connect(&router_addr, router->or_port, channel_tls_connect(&router_addr, router->or_port,
router->cache_info.identity_digest); router->cache_info.identity_digest);
/* Possible IPv6. */ /* Possible IPv6. */
@ -3421,7 +3423,7 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
router->nickname, router->nickname,
tor_addr_to_str(addrstr, &router->ipv6_addr, sizeof(addrstr), 1), tor_addr_to_str(addrstr, &router->ipv6_addr, sizeof(addrstr), 1),
router->ipv6_orport); router->ipv6_orport);
connection_or_connect(&router->ipv6_addr, router->ipv6_orport, channel_tls_connect(&router->ipv6_addr, router->ipv6_orport,
router->cache_info.identity_digest); router->cache_info.identity_digest);
} }
} }