diff options
author | David Garcia Quintas <dgq@google.com> | 2018-03-12 12:08:30 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2018-03-12 12:08:30 -0700 |
commit | 7b84b3d519b0fb678876af10c0bc2206020dbe91 (patch) | |
tree | d27027da72a1b3451ecf5718c835f12d5b2f26ca /src/core/ext/filters/client_channel/client_channel_plugin.cc | |
parent | c7c0d69d8b411f1c5102bfd186aa2f6992c2e59c (diff) |
PR comments
Diffstat (limited to 'src/core/ext/filters/client_channel/client_channel_plugin.cc')
-rw-r--r-- | src/core/ext/filters/client_channel/client_channel_plugin.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel_plugin.cc b/src/core/ext/filters/client_channel/client_channel_plugin.cc index ed3ebd2696..98d9d02110 100644 --- a/src/core/ext/filters/client_channel/client_channel_plugin.cc +++ b/src/core/ext/filters/client_channel/client_channel_plugin.cc @@ -39,31 +39,6 @@ static bool append_filter(grpc_channel_stack_builder* builder, void* arg) { builder, static_cast<const grpc_channel_filter*>(arg), nullptr, nullptr); } -// Only used for direct channels, as they don't create subchannels, which is -// where default authority is handled for regular channels. -static bool set_default_host_if_unset(grpc_channel_stack_builder* builder, - void* unused) { - const grpc_channel_args* args = - grpc_channel_stack_builder_get_channel_arguments(builder); - for (size_t i = 0; i < args->num_args; i++) { - if (0 == strcmp(args->args[i].key, GRPC_ARG_DEFAULT_AUTHORITY) || - 0 == strcmp(args->args[i].key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG)) { - return true; - } - } - grpc_core::UniquePtr<char> default_authority = - grpc_core::ResolverRegistry::GetDefaultAuthority( - grpc_channel_stack_builder_get_target(builder)); - if (default_authority.get() != nullptr) { - grpc_arg arg = grpc_channel_arg_string_create( - (char*)GRPC_ARG_DEFAULT_AUTHORITY, default_authority.get()); - grpc_channel_args* new_args = grpc_channel_args_copy_and_add(args, &arg, 1); - grpc_channel_stack_builder_set_channel_arguments(builder, new_args); - grpc_channel_args_destroy(new_args); - } - return true; -} - void grpc_client_channel_init(void) { grpc_core::LoadBalancingPolicyRegistry::Builder::InitRegistry(); grpc_core::ResolverRegistry::Builder::InitRegistry(); @@ -71,8 +46,6 @@ void grpc_client_channel_init(void) { grpc_proxy_mapper_registry_init(); grpc_register_http_proxy_mapper(); grpc_subchannel_index_init(); - grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MIN, - set_default_host_if_unset, nullptr); grpc_channel_init_register_stage( GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, append_filter, (void*)&grpc_client_channel_filter); |