aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/census
diff options
context:
space:
mode:
authorGravatar Hongyu Chen <hongyu@google.com>2015-10-13 15:05:00 -0700
committerGravatar Hongyu Chen <hongyu@google.com>2015-10-13 15:05:00 -0700
commit738e91e8d1f4f942f486fad319fb9a62df81c8e2 (patch)
tree5da9e4094a3bf91d78fca584f202170d731460a1 /src/core/census
parentbee8f104c0827bc829402d79c8302835adfc37f9 (diff)
Fix call data init in census grpc filter.
Diffstat (limited to 'src/core/census')
-rw-r--r--src/core/census/grpc_filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/census/grpc_filter.c b/src/core/census/grpc_filter.c
index 3545307b66..872543057e 100644
--- a/src/core/census/grpc_filter.c
+++ b/src/core/census/grpc_filter.c
@@ -132,6 +132,7 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_transport_stream_op *initial_op) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
+ memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
if (initial_op) client_mutate_op(elem, initial_op);
}
@@ -149,6 +150,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_transport_stream_op *initial_op) {
call_data *d = elem->call_data;
GPR_ASSERT(d != NULL);
+ memset(d, 0, sizeof(*d));
d->start_ts = gpr_now(GPR_CLOCK_REALTIME);
/* TODO(hongyu): call census_tracing_start_op here. */
grpc_closure_init(d->on_done_recv, server_on_done_recv, elem);