aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface/channel_init.c
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-06 08:07:11 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-06 08:07:11 -0700
commit839bebed9e5e98121369fdb0848d7cafdaca46c6 (patch)
treeebbb8a53aa6f0fba3914c079d301bcd703d595ad /src/core/lib/surface/channel_init.c
parent8166732d1069e0296baaf211eb219922a22eb6f5 (diff)
Use channel args from builder
Diffstat (limited to 'src/core/lib/surface/channel_init.c')
-rw-r--r--src/core/lib/surface/channel_init.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/core/lib/surface/channel_init.c b/src/core/lib/surface/channel_init.c
index d0dd722ae0..0627b34479 100644
--- a/src/core/lib/surface/channel_init.c
+++ b/src/core/lib/surface/channel_init.c
@@ -122,26 +122,19 @@ static const char *name_for_type(grpc_channel_stack_type type) {
GPR_UNREACHABLE_CODE(return "UNKNOWN");
}
-void *grpc_channel_init_create_stack(
- grpc_exec_ctx *exec_ctx, grpc_channel_stack_type type, size_t prefix_bytes,
- const grpc_channel_args *args, int initial_refs, grpc_iomgr_cb_func destroy,
- void *destroy_arg, grpc_transport *transport, const char *target) {
+bool grpc_channel_init_create_stack(grpc_exec_ctx *exec_ctx,
+ grpc_channel_stack_builder *builder,
+ grpc_channel_stack_type type) {
GPR_ASSERT(g_finalized);
- grpc_channel_stack_builder *builder = grpc_channel_stack_builder_create();
grpc_channel_stack_builder_set_name(builder, name_for_type(type));
- grpc_channel_stack_builder_set_channel_arguments(builder, args);
- grpc_channel_stack_builder_set_transport(builder, transport);
- grpc_channel_stack_builder_set_target(builder, target);
for (size_t i = 0; i < g_slots[type].num_slots; i++) {
const stage_slot *slot = &g_slots[type].slots[i];
if (!slot->fn(builder, slot->arg)) {
- grpc_channel_stack_builder_destroy(builder);
- return NULL;
+ return false;
}
}
- return grpc_channel_stack_builder_finish(exec_ctx, builder, prefix_bytes,
- initial_refs, destroy, destroy_arg);
+ return true;
}