diff options
-rw-r--r-- | src/php/ext/grpc/call.c | 12 | ||||
-rw-r--r-- | src/php/ext/grpc/channel.c | 3 | ||||
-rwxr-xr-x | src/php/ext/grpc/channel.h | 1 |
3 files changed, 3 insertions, 13 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index 5ca6a7d43c..684b9ed34a 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -244,15 +244,9 @@ PHP_METHOD(Call, __construct) { wrapped_grpc_timeval *deadline = (wrapped_grpc_timeval *)zend_object_store_get_object( deadline_obj TSRMLS_CC); - if (host_override != NULL) { - call->wrapped = grpc_channel_create_call( - channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, - host_override, deadline->wrapped, NULL); - } else { - call->wrapped = grpc_channel_create_call( - channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, - NULL, deadline->wrapped, NULL); - } + call->wrapped = grpc_channel_create_call( + channel->wrapped, NULL, GRPC_PROPAGATE_DEFAULTS, completion_queue, method, + host_override, deadline->wrapped, NULL); } /** diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index 138af0de22..7a981675de 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -64,7 +64,6 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC) { if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); } - efree(channel->target); efree(channel); } @@ -174,8 +173,6 @@ PHP_METHOD(Channel, __construct) { } efree(args.args); } - channel->target = ecalloc(target_length + 1, sizeof(char)); - memcpy(channel->target, target, target_length); } /** diff --git a/src/php/ext/grpc/channel.h b/src/php/ext/grpc/channel.h index c13fa4c6d7..78a16ed0c9 100755 --- a/src/php/ext/grpc/channel.h +++ b/src/php/ext/grpc/channel.h @@ -53,7 +53,6 @@ typedef struct wrapped_grpc_channel { zend_object std; grpc_channel *wrapped; - char *target; } wrapped_grpc_channel; /* Initializes the Channel class */ |