Revert "Add Type Checking On Channel Args"
diff --git a/src/core/lib/security/transport/target_authority_table.cc b/src/core/lib/security/transport/target_authority_table.cc
index 467e681..1eeb557 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 @@
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