summaryrefslogtreecommitdiff
path: root/sapi/apache_hooks/php_apache.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2009-03-16 09:59:16 +0000
committerPierre Joye <pajoye@php.net>2009-03-16 09:59:16 +0000
commit3091ece096d2df795d24e2b5f263c2436e5e0f22 (patch)
tree1d157d9626b1019c37785e2e2c37d50a179317c4 /sapi/apache_hooks/php_apache.c
parentcc91da1bd7bd37475d06d3d26c731fabf9da065d (diff)
downloadphp-git-3091ece096d2df795d24e2b5f263c2436e5e0f22.tar.gz
- fix vc6 build
Diffstat (limited to 'sapi/apache_hooks/php_apache.c')
-rw-r--r--sapi/apache_hooks/php_apache.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index e6b61bb9b9..67d6aef295 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -713,21 +713,23 @@ PHP_FUNCTION(apache_request_server_port)
PHP_FUNCTION(apache_request_remote_host)
{
zval *id;
- long type = 0;
+ long ztype;
request_rec *r;
char *res;
+ int type = REMOTE_NAME;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &type) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &ztype) == FAILURE) {
return;
}
- if (!type) {
- type = REMOTE_NAME
+ if (ZEND_NUM_ARGS() == 1) {
+ type = ztype;
}
+
APREQ_GET_REQUEST(id, r);
- res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, (int)type);
+ res = (char *)ap_get_remote_host(r->connection, r->per_dir_config, type);
if (res) {
RETURN_STRING(res, 1);