diff options
author | 2015-02-06 12:49:57 -0800 | |
---|---|---|
committer | 2015-02-06 12:49:57 -0800 | |
commit | 62d424a1a4ce55a66a7565795db17ff898bc05f5 (patch) | |
tree | 89b6e34c94fb6144c705ecec0751121fa6d0917b /src/core/surface/call.c | |
parent | fd6f5079b8e11cb604664994aec08423fca6f836 (diff) | |
parent | 4acf81e90246dffa806de6ad1a830d0e62cf727f (diff) |
Merge github.com:google/grpc into buffer
Diffstat (limited to 'src/core/surface/call.c')
-rw-r--r-- | src/core/surface/call.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index feb3926281..0af524cead 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -275,6 +275,7 @@ static void destroy_call(void *call, int ignored_success) { if (c->legacy_state) { destroy_legacy_state(c->legacy_state); } + grpc_bbq_destroy(&c->incoming_queue); gpr_free(c); } @@ -335,8 +336,10 @@ static void unlock(grpc_call *call) { send_action sa = SEND_NOTHING; completed_request completed_requests[GRPC_IOREQ_OP_COUNT]; int num_completed_requests = call->num_completed_requests; - int need_more_data = call->need_more_data && - !is_op_live(call, GRPC_IOREQ_SEND_INITIAL_METADATA); + int need_more_data = + call->need_more_data && + !call->sending && + call->write_state >= WRITE_STATE_STARTED; int i; if (need_more_data) { @@ -960,6 +963,8 @@ struct legacy_state { char *details; grpc_status_code status; + char *send_details; + size_t msg_in_read_idx; grpc_byte_buffer *msg_in; @@ -985,6 +990,8 @@ static void destroy_legacy_state(legacy_state *ls) { } gpr_free(ls->initial_md_in.metadata); gpr_free(ls->trailing_md_in.metadata); + gpr_free(ls->details); + gpr_free(ls->send_details); gpr_free(ls); } @@ -1233,8 +1240,7 @@ grpc_call_error grpc_call_start_write_status_old(grpc_call *call, reqs[0].data.send_metadata.metadata = ls->md_out[ls->md_out_buffer]; reqs[1].op = GRPC_IOREQ_SEND_STATUS; reqs[1].data.send_status.code = status; - /* MEMLEAK */ - reqs[1].data.send_status.details = gpr_strdup(details); + reqs[1].data.send_status.details = ls->send_details = gpr_strdup(details); reqs[2].op = GRPC_IOREQ_SEND_CLOSE; err = start_ioreq(call, reqs, 3, finish_finish, tag); unlock(call); |