aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/surface/channel_create.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-29 15:57:36 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-29 15:57:36 -0700
commitd9a50886041fbd57e228b0b41d259029a576d589 (patch)
tree877b532e7e3003ab03a43d672ec64557d4e28bec /src/core/surface/channel_create.c
parentb6fbf1d986331c8959e60a172fe922d9f864b03f (diff)
SSL channel args work with client config again
Diffstat (limited to 'src/core/surface/channel_create.c')
-rw-r--r--src/core/surface/channel_create.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/surface/channel_create.c b/src/core/surface/channel_create.c
index 0d756a131e..6b559e1fb4 100644
--- a/src/core/surface/channel_create.c
+++ b/src/core/surface/channel_create.c
@@ -102,6 +102,7 @@ typedef struct {
grpc_subchannel_factory base;
gpr_refcount refs;
grpc_mdctx *mdctx;
+ grpc_channel_args *merge_args;
} subchannel_factory;
static void subchannel_factory_ref(grpc_subchannel_factory *scf) {
@@ -120,13 +121,17 @@ static void subchannel_factory_unref(grpc_subchannel_factory *scf) {
static grpc_subchannel *subchannel_factory_create_subchannel(grpc_subchannel_factory *scf, grpc_subchannel_args *args) {
subchannel_factory *f = (subchannel_factory *)scf;
connector *c = gpr_malloc(sizeof(*c));
+ grpc_channel_args *final_args =
+ grpc_channel_args_merge(args->args, f->merge_args);
grpc_subchannel *s;
memset(c, 0, sizeof(*c));
c->base.vtable = &connector_vtable;
gpr_ref_init(&c->refs, 1);
args->mdctx = f->mdctx;
+ args->args = final_args;
s = grpc_subchannel_create(&c->base, args);
grpc_connector_unref(&c->base);
+ grpc_channel_args_destroy(final_args);
return s;
}
@@ -157,6 +162,7 @@ grpc_channel *grpc_channel_create(const char *target,
gpr_ref_init(&f->refs, 1);
grpc_mdctx_ref(mdctx);
f->mdctx = mdctx;
+ f->merge_args = grpc_channel_args_copy(args);
resolver = grpc_resolver_create(target, &f->base);
if (!resolver) {
return NULL;