aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext/grpc
diff options
context:
space:
mode:
authorGravatar thinkerou <thinkerou@gmail.com>2017-09-25 10:09:34 +0800
committerGravatar thinkerou <thinkerou@gmail.com>2017-09-25 10:09:34 +0800
commitb408469090f75e13657e9f5a1920934de4f81323 (patch)
tree25aa10fdef479214fcb58e02edb400586b98e969 /src/php/ext/grpc
parent31c66c576ad00504b34182340f8ff21bc3f447fb (diff)
attempt to fix bug
Diffstat (limited to 'src/php/ext/grpc')
-rw-r--r--src/php/ext/grpc/call.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c
index c4997f720d..c71fa8a9e8 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -301,6 +301,11 @@ PHP_METHOD(Call, startBatch) {
"batch keys must be integers", 1 TSRMLS_CC);
goto cleanup;
}
+
+ ops[op_num].op = (grpc_op_type)index;
+ ops[op_num].flags = 0;
+ ops[op_num].reserved = NULL;
+
switch(index) {
case GRPC_OP_SEND_INITIAL_METADATA:
if (!create_metadata_array(value, &metadata)) {
@@ -414,9 +419,6 @@ PHP_METHOD(Call, startBatch) {
"Unrecognized key in batch", 1 TSRMLS_CC);
goto cleanup;
}
- ops[op_num].op = (grpc_op_type)index;
- ops[op_num].flags = 0;
- ops[op_num].reserved = NULL;
op_num++;
PHP_GRPC_HASH_FOREACH_END()