steinm Mon Jan 27 04:11:15 2003 EDT Modified files: /php4/ext/hyperwave hw.c Log: - fixed several bugs in hw_document_xx() functions. The macro to access the document was the same as for a link to the sever. Index: php4/ext/hyperwave/hw.c diff -u php4/ext/hyperwave/hw.c:1.117 php4/ext/hyperwave/hw.c:1.118 --- php4/ext/hyperwave/hw.c:1.117 Fri Jan 24 11:39:48 2003 +++ php4/ext/hyperwave/hw.c Mon Jan 27 04:11:15 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hw.c,v 1.117 2003/01/24 16:39:48 iliaa Exp $ */ +/* $Id: hw.c,v 1.118 2003/01/27 09:11:15 steinm Exp $ */ #include <stdlib.h> #include <errno.h> @@ -154,8 +154,8 @@ #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_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_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_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_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:
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php