diff options
author | Craig Tiller <ctiller@google.com> | 2015-08-18 09:40:24 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-08-18 09:40:24 -0700 |
commit | 9928d39f4d3ac51775182701b2296caa89052aaa (patch) | |
tree | ac2f0346f6099b2e9d4a68c020f2c1029350c438 /src/core | |
parent | bb1c795f998f052f854a6e1aeebff44e293a29f4 (diff) |
Add some reserved checks that need to be present
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/surface/call.c | 4 | ||||
-rw-r--r-- | src/core/surface/server.c | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index f3012d0c59..478001ac18 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -1572,7 +1572,8 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, const grpc_op *op; grpc_ioreq *req; void (*finish_func)(grpc_call *, int, void *) = finish_batch; - GPR_ASSERT(!reserved); + + if (reserved != NULL) return GRPC_CALL_ERROR; GRPC_CALL_LOG_BATCH(GPR_INFO, call, ops, nops, tag); @@ -1587,6 +1588,7 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, /* rewrite batch ops into ioreq ops */ for (in = 0, out = 0; in < nops; in++) { op = &ops[in]; + if (op->reserved != NULL) return GRPC_CALL_ERROR; switch (op->op) { case GRPC_OP_SEND_INITIAL_METADATA: /* Flag validation: currently allow no flags */ diff --git a/src/core/surface/server.c b/src/core/surface/server.c index f883275951..e3e86d188a 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -1134,6 +1134,7 @@ grpc_call_error grpc_server_request_call( return GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE; } grpc_cq_begin_op(cq_for_notification); + details->reserved = NULL; rc->type = BATCH_CALL; rc->server = server; rc->tag = tag; |