aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
diff options
context:
space:
mode:
authorGravatar Juanli Shen <aspirinsjl@gmail.com>2019-01-09 09:24:11 -0800
committerGravatar GitHub <noreply@github.com>2019-01-09 09:24:11 -0800
commit3a59faf632427f26bc8dceed46c1fe748fd7df3c (patch)
tree3b59274711e47984ddfd130b9e744296b6dba3bd /src/core/ext/transport/chttp2/client/insecure/channel_create.cc
parentcc0449465fb76516c15c05cacc1c624e471f2014 (diff)
parent23677bd827f6e749b4a3e2bec73eea40dece565e (diff)
Merge pull request #17668 from AspirinSJL/remove_sc_arg
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;
}