Skip to content
Snippets Groups Projects
Commit 60f406ab authored by Alistair Veitch's avatar Alistair Veitch
Browse files

Merge pull request #3816 from maxwell-demon/master

Fix call data init in census grpc filter.
parents bee8f104 738e91e8
No related branches found
No related tags found
No related merge requests found
...@@ -132,6 +132,7 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx, ...@@ -132,6 +132,7 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_transport_stream_op *initial_op) { grpc_transport_stream_op *initial_op) {
call_data *d = elem->call_data; call_data *d = elem->call_data;
GPR_ASSERT(d != NULL); GPR_ASSERT(d != NULL);
memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME); d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
if (initial_op) client_mutate_op(elem, initial_op); if (initial_op) client_mutate_op(elem, initial_op);
} }
...@@ -149,6 +150,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx, ...@@ -149,6 +150,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_transport_stream_op *initial_op) { grpc_transport_stream_op *initial_op) {
call_data *d = elem->call_data; call_data *d = elem->call_data;
GPR_ASSERT(d != NULL); GPR_ASSERT(d != NULL);
memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME); d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
/* TODO(hongyu): call census_tracing_start_op here. */ /* TODO(hongyu): call census_tracing_start_op here. */
grpc_closure_init(d->on_done_recv, server_on_done_recv, elem); grpc_closure_init(d->on_done_recv, server_on_done_recv, elem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment