|
|
@ -425,7 +425,7 @@ static grpc_resolver_factory* dns_ares_resolver_factory_create() { |
|
|
|
return &dns_resolver_factory; |
|
|
|
return &dns_resolver_factory; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
extern "C" void grpc_resolver_dns_ares_init(void) { |
|
|
|
void grpc_resolver_dns_ares_init(void) { |
|
|
|
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER"); |
|
|
|
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER"); |
|
|
|
/* TODO(zyc): Turn on c-ares based resolver by default after the address
|
|
|
|
/* TODO(zyc): Turn on c-ares based resolver by default after the address
|
|
|
|
sorter and the CNAME support are added. */ |
|
|
|
sorter and the CNAME support are added. */ |
|
|
@ -441,7 +441,7 @@ extern "C" void grpc_resolver_dns_ares_init(void) { |
|
|
|
gpr_free(resolver); |
|
|
|
gpr_free(resolver); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
extern "C" void grpc_resolver_dns_ares_shutdown(void) { |
|
|
|
void grpc_resolver_dns_ares_shutdown(void) { |
|
|
|
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER"); |
|
|
|
char* resolver = gpr_getenv("GRPC_DNS_RESOLVER"); |
|
|
|
if (resolver != nullptr && gpr_stricmp(resolver, "ares") == 0) { |
|
|
|
if (resolver != nullptr && gpr_stricmp(resolver, "ares") == 0) { |
|
|
|
grpc_ares_cleanup(); |
|
|
|
grpc_ares_cleanup(); |
|
|
@ -451,8 +451,8 @@ extern "C" void grpc_resolver_dns_ares_shutdown(void) { |
|
|
|
|
|
|
|
|
|
|
|
#else /* GRPC_ARES == 1 && !defined(GRPC_UV) */ |
|
|
|
#else /* GRPC_ARES == 1 && !defined(GRPC_UV) */ |
|
|
|
|
|
|
|
|
|
|
|
extern "C" void grpc_resolver_dns_ares_init(void) {} |
|
|
|
void grpc_resolver_dns_ares_init(void) {} |
|
|
|
|
|
|
|
|
|
|
|
extern "C" void grpc_resolver_dns_ares_shutdown(void) {} |
|
|
|
void grpc_resolver_dns_ares_shutdown(void) {} |
|
|
|
|
|
|
|
|
|
|
|
#endif /* GRPC_ARES == 1 && !defined(GRPC_UV) */ |
|
|
|
#endif /* GRPC_ARES == 1 && !defined(GRPC_UV) */ |
|
|
|