Skip to content
Snippets Groups Projects
Commit a25cbbc8 authored by Craig Tiller's avatar Craig Tiller
Browse files

Convert more of PHP

parent 3bfb0048
No related branches found
No related tags found
No related merge requests found
...@@ -271,8 +271,7 @@ PHP_METHOD(Call, startBatch) { ...@@ -271,8 +271,7 @@ PHP_METHOD(Call, startBatch) {
grpc_metadata_array recv_metadata; grpc_metadata_array recv_metadata;
grpc_metadata_array recv_trailing_metadata; grpc_metadata_array recv_trailing_metadata;
grpc_status_code status; grpc_status_code status;
char *status_details = NULL; grpc_slice status_details;
size_t status_details_capacity = 0;
grpc_byte_buffer *message; grpc_byte_buffer *message;
int cancelled; int cancelled;
grpc_call_error error; grpc_call_error error;
...@@ -384,8 +383,8 @@ PHP_METHOD(Call, startBatch) { ...@@ -384,8 +383,8 @@ PHP_METHOD(Call, startBatch) {
1 TSRMLS_CC); 1 TSRMLS_CC);
goto cleanup; goto cleanup;
} }
ops[op_num].data.send_status_from_server.status_details = grpc_slice send_status_details = grpc_slice_from_copied_string(Z_STRVAL_P(inner_value));
Z_STRVAL_P(inner_value); ops[op_num].data.send_status_from_server.status_details = &send_status_details;
} else { } else {
zend_throw_exception(spl_ce_InvalidArgumentException, zend_throw_exception(spl_ce_InvalidArgumentException,
"String status details is required", "String status details is required",
...@@ -405,8 +404,6 @@ PHP_METHOD(Call, startBatch) { ...@@ -405,8 +404,6 @@ PHP_METHOD(Call, startBatch) {
ops[op_num].data.recv_status_on_client.status = &status; ops[op_num].data.recv_status_on_client.status = &status;
ops[op_num].data.recv_status_on_client.status_details = ops[op_num].data.recv_status_on_client.status_details =
&status_details; &status_details;
ops[op_num].data.recv_status_on_client.status_details_capacity =
&status_details_capacity;
break; break;
case GRPC_OP_RECV_CLOSE_ON_SERVER: case GRPC_OP_RECV_CLOSE_ON_SERVER:
ops[op_num].data.recv_close_on_server.cancelled = &cancelled; ops[op_num].data.recv_close_on_server.cancelled = &cancelled;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment