aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
diff options
context:
space:
mode:
authorGravatar Juanli Shen <juanlishen@google.com>2019-01-08 17:41:23 -0800
committerGravatar Juanli Shen <juanlishen@google.com>2019-01-08 19:43:45 -0800
commit23677bd827f6e749b4a3e2bec73eea40dece565e (patch)
tree0e2ab5c11ee8924efa2cf023411427f6d6992433 /src/core/ext/transport/chttp2/client/insecure/channel_create.cc
parent26dddbb10dfc74db458d975f42346a9d677ca5ed (diff)
Remove subchannel args
Diffstat (limited to 'src/core/ext/transport/chttp2/client/insecure/channel_create.cc')
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
index e6c8c38260..a5bf1bf21d 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
@@ -40,14 +40,12 @@ static void client_channel_factory_unref(
grpc_client_channel_factory* cc_factory) {}
static grpc_subchannel* client_channel_factory_create_subchannel(
- grpc_client_channel_factory* cc_factory, const grpc_subchannel_args* args) {
- grpc_subchannel_args final_sc_args;
- memcpy(&final_sc_args, args, sizeof(*args));
- final_sc_args.args = grpc_default_authority_add_if_not_present(args->args);
+ grpc_client_channel_factory* cc_factory, const grpc_channel_args* args) {
+ grpc_channel_args* new_args = grpc_default_authority_add_if_not_present(args);
grpc_connector* connector = grpc_chttp2_connector_create();
- grpc_subchannel* s = grpc_subchannel_create(connector, &final_sc_args);
+ grpc_subchannel* s = grpc_subchannel_create(connector, new_args);
grpc_connector_unref(connector);
- grpc_channel_args_destroy(const_cast<grpc_channel_args*>(final_sc_args.args));
+ grpc_channel_args_destroy(new_args);
return s;
}