summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Steinmann <steinm@php.net>2003-01-27 09:11:17 +0000
committerUwe Steinmann <steinm@php.net>2003-01-27 09:11:17 +0000
commitc375b0b05ccc883f832eed30362bfca873d23738 (patch)
tree9d722f733f8e3f9317b3ad119a14838dd546ffd8
parent761fa96412960d942e8767df7a3874f84371db34 (diff)
downloadphp-git-c375b0b05ccc883f832eed30362bfca873d23738.tar.gz
- fixed several bugs in hw_document_xx() functions. The macro to access
the document was the same as for a link to the sever.
-rw-r--r--ext/hyperwave/hw.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/hyperwave/hw.c b/ext/hyperwave/hw.c
index 0f35e101d1..4975b9586f 100644
--- a/ext/hyperwave/hw.c
+++ b/ext/hyperwave/hw.c
@@ -154,8 +154,8 @@ ZEND_GET_MODULE(hw)
#define HW_FETCH_ID(hw_zval) \
convert_to_long_ex(hw_zval); \
id = Z_LVAL_PP(hw_zval); \
- ptr = zend_list_find(id, &type); \
- if(!ptr || (type != le_socketp && type != le_psocketp)) { \
+ ptr = (hw_document *) zend_list_find(id, &type); \
+ if(!ptr || (type != le_document)) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find file identifier %d", id); \
RETURN_FALSE; \
}
@@ -983,14 +983,14 @@ PHP_FUNCTION(hw_pconnect)
PHP_FUNCTION(hw_close)
{
zval **arg1;
- int id, type;
+ int link, type;
hw_connection *ptr;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- HW_FETCH_ID(arg1);
- zend_list_delete(id);
+ HW_FETCH_LINK(arg1);
+ zend_list_delete(link);
RETURN_TRUE;
}
/* }}} */
@@ -1000,14 +1000,14 @@ PHP_FUNCTION(hw_close)
PHP_FUNCTION(hw_info)
{
pval **arg1;
- int id, type;
+ int link, type;
hw_connection *ptr;
char *str;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- HW_FETCH_ID(arg1);
+ HW_FETCH_LINK(arg1);
if(NULL != (str = get_hw_info(ptr))) {
/*
php_printf("%s\n", str);
@@ -1027,13 +1027,13 @@ PHP_FUNCTION(hw_info)
PHP_FUNCTION(hw_error)
{
pval **arg1;
- int id, type;
+ int link, type;
hw_connection *ptr;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- HW_FETCH_ID(arg1);
+ HW_FETCH_LINK(arg1);
RETURN_LONG(ptr->lasterror);
}
/* }}} */
@@ -1043,14 +1043,14 @@ PHP_FUNCTION(hw_error)
PHP_FUNCTION(hw_errormsg)
{
pval **arg1;
- int id, type;
+ int link, type;
hw_connection *ptr;
char errstr[100];
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg1) == FAILURE) {
WRONG_PARAM_COUNT;
}
- HW_FETCH_ID(arg1);
+ HW_FETCH_LINK(arg1);
switch (ptr->lasterror) {
case 0: