diff options
author | rl1987 <rl1987@sdf.lonestar.org> | 2015-10-20 20:40:21 +0300 |
---|---|---|
committer | rl1987 <rl1987@sdf.lonestar.org> | 2015-10-24 14:30:52 +0300 |
commit | f53dcf6a357e83a0b018d6f66bfb8a30734bd9a9 (patch) | |
tree | 2f4e470f0a413f78d5567da54d9c230710de0001 /src/or | |
parent | cc1bed9974f90e7021468f9f85b0a66b21ee9151 (diff) | |
download | tor-f53dcf6a357e83a0b018d6f66bfb8a30734bd9a9.tar.gz tor-f53dcf6a357e83a0b018d6f66bfb8a30734bd9a9.zip |
Sixth test case for dns_resolve_impl.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dns.c | 11 | ||||
-rw-r--r-- | src/or/dns.h | 5 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 234dfbe687..297ac6f0d5 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -111,9 +111,6 @@ static int launch_resolve(cached_resolve_t *resolve); static void add_wildcarded_test_address(const char *address); static int configure_nameservers(int force); static int answer_is_wildcarded(const char *ip); -static int set_exitconn_info_from_resolve(edge_connection_t *exitconn, - const cached_resolve_t *resolve, - char **hostname_out); static int evdns_err_is_transient(int err); static void inform_pending_connections(cached_resolve_t *resolve); static void make_pending_resolve_cached(cached_resolve_t *cached); @@ -859,10 +856,10 @@ dns_resolve_impl,(edge_connection_t *exitconn, int is_resolve, * Return -2 on a transient error, -1 on a permenent error, and 1 on * a successful lookup. */ -static int -set_exitconn_info_from_resolve(edge_connection_t *exitconn, - const cached_resolve_t *resolve, - char **hostname_out) +MOCK_IMPL(STATIC int, +set_exitconn_info_from_resolve,(edge_connection_t *exitconn, + const cached_resolve_t *resolve, + char **hostname_out)) { int ipv4_ok, ipv6_ok, answer_with_ipv4, r; uint32_t begincell_flags; diff --git a/src/or/dns.h b/src/or/dns.h index 163d61b881..64e970a222 100644 --- a/src/or/dns.h +++ b/src/or/dns.h @@ -46,6 +46,11 @@ const char *hostname)); cached_resolve_t *dns_get_cache_entry(cached_resolve_t *query); void dns_insert_cache_entry(cached_resolve_t *new_entry); +MOCK_DECL(STATIC int, +set_exitconn_info_from_resolve,(edge_connection_t *exitconn, + const cached_resolve_t *resolve, + char **hostname_out)); + #endif #endif |