|
|
@ -872,6 +872,10 @@ void grpc_call_initial_metadata_complete(grpc_call_element *surface_element) { |
|
|
|
unlock(call); |
|
|
|
unlock(call); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void finish_read_event(void *p, grpc_op_error error) { |
|
|
|
|
|
|
|
grpc_byte_buffer_destroy(p); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void finish_read(grpc_call *call, grpc_op_error error, void *tag) { |
|
|
|
static void finish_read(grpc_call *call, grpc_op_error error, void *tag) { |
|
|
|
legacy_state *ls; |
|
|
|
legacy_state *ls; |
|
|
|
lock(call); |
|
|
|
lock(call); |
|
|
@ -879,8 +883,8 @@ static void finish_read(grpc_call *call, grpc_op_error error, void *tag) { |
|
|
|
if (ls->msg_in.count == 0) { |
|
|
|
if (ls->msg_in.count == 0) { |
|
|
|
grpc_cq_end_read(call->cq, tag, call, do_nothing, NULL, NULL); |
|
|
|
grpc_cq_end_read(call->cq, tag, call, do_nothing, NULL, NULL); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
grpc_cq_end_read(call->cq, tag, call, do_nothing, NULL, |
|
|
|
grpc_byte_buffer *msg = ls->msg_in.buffers[ls->msg_in_read_idx++]; |
|
|
|
ls->msg_in.buffers[ls->msg_in_read_idx++]); |
|
|
|
grpc_cq_end_read(call->cq, tag, call, finish_read_event, msg, msg); |
|
|
|
maybe_finish_legacy(call); |
|
|
|
maybe_finish_legacy(call); |
|
|
|
} |
|
|
|
} |
|
|
|
unlock(call); |
|
|
|
unlock(call); |
|
|
|