diff options
author | Yuchen Zeng <zyc@google.com> | 2017-05-30 18:26:17 -0700 |
---|---|---|
committer | Yuchen Zeng <zyc@google.com> | 2017-05-30 18:26:17 -0700 |
commit | 24e3bc5510bfee61d9f62feac95fbe32b1267b85 (patch) | |
tree | ce175c641997407f2ce165f1f984f55a6ae1a5ae /src/core/ext | |
parent | 4c15fac09f1dcd686f777e7d3d5e9b526f77457b (diff) |
Fix api_fuzzer, dns_resolver_connectivity_test
Diffstat (limited to 'src/core/ext')
-rw-r--r-- | src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c | 16 | ||||
-rw-r--r-- | src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h | 9 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c index 65e9600845..8f856885ec 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.c @@ -282,11 +282,11 @@ static void on_srv_query_done_cb(void *arg, int status, int timeouts, grpc_exec_ctx_finish(&exec_ctx); } -void grpc_dns_lookup_ares(grpc_exec_ctx *exec_ctx, const char *dns_server, - const char *name, const char *default_port, - grpc_pollset_set *interested_parties, - grpc_closure *on_done, grpc_lb_addresses **addrs, - bool check_grpclb) { +void grpc_dns_lookup_ares_impl(grpc_exec_ctx *exec_ctx, const char *dns_server, + const char *name, const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, grpc_lb_addresses **addrs, + bool check_grpclb) { grpc_error *error = GRPC_ERROR_NONE; /* TODO(zyc): Enable tracing after #9603 is checked in */ /* if (grpc_dns_trace) { @@ -392,6 +392,12 @@ error_cleanup: gpr_free(port); } +void (*grpc_dns_lookup_ares)(grpc_exec_ctx *exec_ctx, const char *dns_server, + const char *name, const char *default_port, + grpc_pollset_set *interested_parties, + grpc_closure *on_done, grpc_lb_addresses **addrs, + bool check_grpclb) = grpc_dns_lookup_ares_impl; + grpc_error *grpc_ares_init(void) { gpr_once_init(&g_basic_init, do_basic_init); gpr_mu_lock(&g_init_mu); diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h index 51a9285d4d..9bcc115beb 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h @@ -59,11 +59,10 @@ extern void (*grpc_resolve_address_ares)(grpc_exec_ctx *exec_ctx, function. \a on_done may be called directly in this function without being scheduled with \a exec_ctx, it must not try to acquire locks that are being held by the caller. */ -void grpc_dns_lookup_ares(grpc_exec_ctx *exec_ctx, const char *dns_server, - const char *addr, const char *default_port, - grpc_pollset_set *interested_parties, - grpc_closure *on_done, grpc_lb_addresses **addresses, - bool check_grpclb); +extern void (*grpc_dns_lookup_ares)( + grpc_exec_ctx *exec_ctx, const char *dns_server, const char *addr, + const char *default_port, grpc_pollset_set *interested_parties, + grpc_closure *on_done, grpc_lb_addresses **addresses, bool check_grpclb); /* Initialize gRPC ares wrapper. Must be called at least once before grpc_resolve_address_ares(). */ |