aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface/secure_channel_create.c
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-08-17 15:37:27 -0700
committerGravatar yang-g <yangg@google.com>2015-08-17 15:37:27 -0700
commitc31cd86a7448050653e41a861aa331ce5b078a81 (patch)
tree596ea1de78a637256c111b52a9b048a1a1f2d841 /src/core/surface/secure_channel_create.c
parentb7eefcf757f2e62b82a812373a25a772824ef7c6 (diff)
Let lame_client accept error status
Diffstat (limited to 'src/core/surface/secure_channel_create.c')
-rw-r--r--src/core/surface/secure_channel_create.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/surface/secure_channel_create.c b/src/core/surface/secure_channel_create.c
index c3150250b8..5b03ba95a7 100644
--- a/src/core/surface/secure_channel_create.c
+++ b/src/core/surface/secure_channel_create.c
@@ -199,13 +199,17 @@ grpc_channel *grpc_secure_channel_create(grpc_credentials *creds,
if (grpc_find_security_connector_in_args(args) != NULL) {
gpr_log(GPR_ERROR, "Cannot set security context in channel args.");
- return grpc_lame_client_channel_create(target);
+ return grpc_lame_client_channel_create(
+ target, GRPC_STATUS_INVALID_ARGUMENT,
+ "Security connector exists in channel args.");
}
if (grpc_credentials_create_security_connector(
creds, target, args, NULL, &connector, &new_args_from_connector) !=
GRPC_SECURITY_OK) {
- return grpc_lame_client_channel_create(target);
+ return grpc_lame_client_channel_create(
+ target, GRPC_STATUS_INVALID_ARGUMENT,
+ "Failed to create security connector.");
}
mdctx = grpc_mdctx_create();