diff options
author | 2018-03-14 11:19:26 -0700 | |
---|---|---|
committer | 2018-03-14 11:19:26 -0700 | |
commit | 2f6fc700de0431878ade712051981a2609793553 (patch) | |
tree | 8d08aefb2cda4b4781003acd1982a13d5225ccaa | |
parent | aa843f2bfc83b588a645d5edc9300b0e1d353f93 (diff) |
Abort if direct channel doesn't provide default authority ch arg
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | src/core/lib/surface/channel.cc | 7 |
2 files changed, 6 insertions, 9 deletions
@@ -3160,7 +3160,6 @@ LIBGRPC_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -3438,6 +3437,7 @@ LIBGRPC_SRC = \ src/core/ext/census/grpc_context.cc \ src/core/ext/filters/max_age/max_age_filter.cc \ src/core/ext/filters/message_size/message_size_filter.cc \ + src/core/lib/channel/client_authority_filter.cc \ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \ src/core/ext/filters/workarounds/workaround_utils.cc \ src/core/plugin_registry/grpc_plugin_registry.cc \ @@ -3538,7 +3538,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -3906,7 +3905,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4189,7 +4187,6 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4439,7 +4436,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ @@ -4652,6 +4648,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/census/grpc_context.cc \ src/core/ext/filters/max_age/max_age_filter.cc \ src/core/ext/filters/message_size/message_size_filter.cc \ + src/core/lib/channel/client_authority_filter.cc \ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc \ src/core/ext/filters/workarounds/workaround_utils.cc \ src/core/plugin_registry/grpc_unsecure_plugin_registry.cc \ @@ -5242,7 +5239,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/channel/channel_args.cc \ src/core/lib/channel/channel_stack.cc \ src/core/lib/channel/channel_stack_builder.cc \ - src/core/lib/channel/client_authority_filter.cc \ src/core/lib/channel/connected_channel.cc \ src/core/lib/channel/handshaker.cc \ src/core/lib/channel/handshaker_factory.cc \ diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc index 93f3009dba..274dfe38bf 100644 --- a/src/core/lib/surface/channel.cc +++ b/src/core/lib/surface/channel.cc @@ -157,9 +157,10 @@ static grpc_core::UniquePtr<char> get_default_authority( } if (channel_stack_type == GRPC_CLIENT_DIRECT_CHANNEL && default_authority == nullptr) { - // Set the default authority. This is handled by the subchannel stack for - // regular client channels. - default_authority.reset(gpr_strdup(target)); + gpr_log(GPR_ERROR, + "Direct channels must specify a value for the " + "GRPC_ARG_DEFAULT_AUTHORITY channel arg."); + abort(); } return default_authority; } |