void grpc_call_recv_message(grpc_call_element *elem, grpc_byte_buffer *byte_buffer) { grpc_call *call = CALL_FROM_TOP_ELEM(elem); lock(call); grpc_bbq_push(&call->incoming_queue, byte_buffer); finish_read_ops(call); unlock(call); }
static void finish_message(grpc_call *call) { /* TODO(ctiller): this could be a lot faster if coded directly */ grpc_byte_buffer *byte_buffer = grpc_byte_buffer_create( call->incoming_message.slices, call->incoming_message.count); gpr_slice_buffer_reset_and_unref(&call->incoming_message); grpc_bbq_push(&call->incoming_queue, byte_buffer); GPR_ASSERT(call->incoming_message.count == 0); call->reading_message = 0; }