aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext
diff options
context:
space:
mode:
authorGravatar Zhouyihai Ding <ddyihai@google.com>2018-01-30 13:24:14 -0800
committerGravatar GitHub <noreply@github.com>2018-01-30 13:24:14 -0800
commit1952018a02a34fd6334921be26492985ed64afe3 (patch)
tree8f507a797fafae4238e84aae1c56fbb97960ef50 /src/php/ext
parent29d1e504ee555d1d23767525f81cc710258bd382 (diff)
parentb408469090f75e13657e9f5a1920934de4f81323 (diff)
Merge pull request #12703 from thinkerou/fix_bug
PHP: fix call flag been reset bug
Diffstat (limited to 'src/php/ext')
-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 ff55c3cbfa..b802f04f53 100644
--- a/src/php/ext/grpc/call.c
+++ b/src/php/ext/grpc/call.c
@@ -316,6 +316,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)) {
@@ -429,9 +434,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()