aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security/transport/target_authority_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/security/transport/target_authority_table.cc')
-rw-r--r--src/core/lib/security/transport/target_authority_table.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/lib/security/transport/target_authority_table.cc b/src/core/lib/security/transport/target_authority_table.cc
index 467e681a50..1eeb557f6a 100644
--- a/src/core/lib/security/transport/target_authority_table.cc
+++ b/src/core/lib/security/transport/target_authority_table.cc
@@ -59,8 +59,17 @@ grpc_arg CreateTargetAuthorityTableChannelArg(TargetAuthorityTable* table) {
TargetAuthorityTable* FindTargetAuthorityTableInArgs(
const grpc_channel_args* args) {
- return grpc_channel_args_get_pointer<TargetAuthorityTable>(
- args, GRPC_ARG_TARGET_AUTHORITY_TABLE);
+ const grpc_arg* arg =
+ grpc_channel_args_find(args, GRPC_ARG_TARGET_AUTHORITY_TABLE);
+ if (arg != nullptr) {
+ if (arg->type == GRPC_ARG_POINTER) {
+ return static_cast<TargetAuthorityTable*>(arg->value.pointer.p);
+ } else {
+ gpr_log(GPR_ERROR, "value of " GRPC_ARG_TARGET_AUTHORITY_TABLE
+ " channel arg was not pointer type; ignoring");
+ }
+ }
+ return nullptr;
}
} // namespace grpc_core