diff options
author | 2015-02-04 17:31:12 -0800 | |
---|---|---|
committer | 2015-02-04 17:31:12 -0800 | |
commit | b5ba155cf81cc89b5f17d2bb95ed37d94a669d38 (patch) | |
tree | 271c69d77266588fc610652c636ca07a9895daa8 /src/core/surface/call.c | |
parent | 7bd9b99d970a2f34ab59e24b114266d93dc871e4 (diff) | |
parent | 53476f1d0e52dfa21fa5363fe29396e96748ab14 (diff) |
Merge github.com:google/grpc into buffer
Conflicts:
src/core/surface/call.c
Diffstat (limited to 'src/core/surface/call.c')
-rw-r--r-- | src/core/surface/call.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index e878e1a3f3..76cc85983b 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -497,7 +497,7 @@ static void finish_start_step(void *pc, grpc_op_error error) { static send_action choose_send_action(grpc_call *call) { switch (call->write_state) { case WRITE_STATE_INITIAL: - if (call->request_set[GRPC_IOREQ_SEND_INITIAL_METADATA] != REQSET_EMPTY) { + if (is_op_live(call, GRPC_IOREQ_SEND_INITIAL_METADATA)) { call->write_state = WRITE_STATE_STARTED; return is_op_live(call, GRPC_IOREQ_SEND_MESSAGE) || is_op_live(call, GRPC_IOREQ_SEND_CLOSE) @@ -506,11 +506,11 @@ static send_action choose_send_action(grpc_call *call) { } return SEND_NOTHING; case WRITE_STATE_STARTED: - if (call->request_set[GRPC_IOREQ_SEND_MESSAGE] != REQSET_EMPTY) { + if (is_op_live(call, GRPC_IOREQ_SEND_MESSAGE)) { return is_op_live(call, GRPC_IOREQ_SEND_CLOSE) ? SEND_BUFFERED_MESSAGE : SEND_MESSAGE; } - if (call->request_set[GRPC_IOREQ_SEND_CLOSE] != REQSET_EMPTY) { + if (is_op_live(call, GRPC_IOREQ_SEND_CLOSE)) { call->write_state = WRITE_STATE_WRITE_CLOSED; finish_ioreq_op(call, GRPC_IOREQ_SEND_TRAILING_METADATA, GRPC_OP_OK); finish_ioreq_op(call, GRPC_IOREQ_SEND_STATUS, GRPC_OP_OK); |