aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2015-08-19 15:11:51 -0700
committerGravatar Stanley Cheung <stanleycheung@google.com>2015-08-19 15:11:51 -0700
commitddb16a84360b8c1205897b8d954d013cc99c5b43 (patch)
tree387fc2a42072ecf81ad4acb70b98b5de9ae7968a /src/php
parent478fb00a2cec11d7178ca6f1605f920e1c4142a1 (diff)
php: expose per-call host override option, review feedback
Diffstat (limited to 'src/php')
-rw-r--r--src/php/ext/grpc/call.c12
-rw-r--r--src/php/ext/grpc/channel.c3
-rwxr-xr-xsrc/php/ext/grpc/channel.h1
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 */