diff options
author | 2015-12-03 13:29:28 -0800 | |
---|---|---|
committer | 2015-12-03 13:29:28 -0800 | |
commit | f48c46f7ecc535f3ae8a06ab67b125e9dcb7aea4 (patch) | |
tree | 5ec5226fa343c6589f3a6b6b9f3237d2b7fe518f | |
parent | 368a304c940e5379935aa828f3f30d17d7a29fbb (diff) | |
parent | 6d1882b4b269dc66ffa96915ad5ab2ca2178dd51 (diff) |
Merge pull request #4278 from ctiller/ding-ding-ding-ding
Make default prefix overridable
-rw-r--r-- | src/core/surface/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 04d68620f1..e0106d8f2b 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -58,6 +58,10 @@ #include "src/core/transport/chttp2_transport.h" #include "src/core/transport/connectivity_state.h" +#ifndef GRPC_DEFAULT_NAME_PREFIX +#define GRPC_DEFAULT_NAME_PREFIX "dns:///" +#endif + #define MAX_PLUGINS 128 static gpr_once g_basic_init = GPR_ONCE_INIT; @@ -97,7 +101,7 @@ void grpc_init(void) { grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create()); grpc_register_lb_policy(grpc_pick_first_lb_factory_create()); grpc_register_lb_policy(grpc_round_robin_lb_factory_create()); - grpc_resolver_registry_init("dns:///"); + grpc_resolver_registry_init(GRPC_DEFAULT_NAME_PREFIX); grpc_register_resolver_type(grpc_dns_resolver_factory_create()); grpc_register_resolver_type(grpc_ipv4_resolver_factory_create()); grpc_register_resolver_type(grpc_ipv6_resolver_factory_create()); |