aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/channel/connected_channel.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-06-23 10:15:12 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-06-23 10:15:12 -0700
commit0badbe8b119c7375dfb0f8e6f853180009a2ffb7 (patch)
treecb1e17dcc30d141196c2c62306b73db014df505d /src/core/lib/channel/connected_channel.c
parentacbf8c290afe4f3f0e690162f17b63df8096280f (diff)
Change grpc_channel_filter init_call_elem() method to return grpc_error.
Diffstat (limited to 'src/core/lib/channel/connected_channel.c')
-rw-r--r--src/core/lib/channel/connected_channel.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c
index 0a7d27a1dc..8dde688df2 100644
--- a/src/core/lib/channel/connected_channel.c
+++ b/src/core/lib/channel/connected_channel.c
@@ -81,16 +81,17 @@ static void con_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
-static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_call_element_args *args) {
+static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
+ grpc_call_element *elem,
+ grpc_call_element_args *args) {
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
- int r;
-
- r = grpc_transport_init_stream(
+ int r = grpc_transport_init_stream(
exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld),
&args->call_stack->refcount, args->server_transport_data);
- GPR_ASSERT(r == 0);
+ return r == 0
+ ? GRPC_ERROR_NONE
+ : GRPC_ERROR_CREATE("transport initialization failed");
}
static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,