aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-11-03 12:32:39 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-11-03 12:32:39 -0700
commit9ec28af03aaad085902c65b7a59fca5abbedcbad (patch)
treeecdd9bfbe2fef4f4be0080099469baed82b6420f /src/core/ext
parentea846a08004501fa4b63dbb5bd7bb12bd1017a33 (diff)
Change value of channel arg to string form, and reparse in each place we use it.
Diffstat (limited to 'src/core/ext')
-rw-r--r--src/core/ext/client_channel/client_channel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/ext/client_channel/client_channel.c b/src/core/ext/client_channel/client_channel.c
index d9161f47cd..023bd24c19 100644
--- a/src/core/ext/client_channel/client_channel.c
+++ b/src/core/ext/client_channel/client_channel.c
@@ -302,11 +302,13 @@ static void on_resolver_result_changed(grpc_exec_ctx *exec_ctx, void *arg,
channel_arg =
grpc_channel_args_find(chand->resolver_result, GRPC_ARG_SERVICE_CONFIG);
if (channel_arg != NULL) {
- GPR_ASSERT(channel_arg->type == GRPC_ARG_POINTER);
- grpc_json_tree *service_config_json = channel_arg->value.pointer.p;
- method_params_table = grpc_method_config_table_create_from_json(
- service_config_json->root, method_parameters_create_from_json,
+ GPR_ASSERT(channel_arg->type == GRPC_ARG_STRING);
+ grpc_service_config* service_config =
+ grpc_service_config_create(channel_arg->value.string);
+ method_params_table = grpc_service_config_create_method_config_table(
+ service_config, method_parameters_create_from_json,
&method_parameters_vtable);
+ grpc_service_config_destroy(service_config);
}
// Clean up.
grpc_channel_args_destroy(chand->resolver_result);