diff options
author | Sterling Hughes <sterling@php.net> | 2001-06-01 18:41:06 +0000 |
---|---|---|
committer | Sterling Hughes <sterling@php.net> | 2001-06-01 18:41:06 +0000 |
commit | 015e1d3d68f3c365637180335fa136ec89b649d0 (patch) | |
tree | a71884bc9bbaf9fb43b6be03416c71bf9a05b1bc | |
parent | 171c425641f3d28aeb2a387258f5d1a3ebe93836 (diff) | |
download | php-git-015e1d3d68f3c365637180335fa136ec89b649d0.tar.gz |
# testing changes is a good idea.
We were passing the php socket resource identifier to select instead of
the socket fd...
-rw-r--r-- | ext/sockets/sockets.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index b192e6b1ee..cc591ab9d0 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -482,6 +482,7 @@ PHP_FUNCTION(socket_fd_zero) PHP_FUNCTION(socket_select) { zval **arg1, **arg2, **arg3, **arg4, **arg5, **arg6; + php_sock *php_sock; struct timeval tv; fd_set *rfds, *wfds, *xfds; @@ -489,16 +490,16 @@ PHP_FUNCTION(socket_select) WRONG_PARAM_COUNT; } - convert_to_long_ex(arg1); convert_to_long_ex(arg5); convert_to_long_ex(arg6); - ZEND_FETCH_RESOURCE(rfds, fd_set*, arg2, -1, "File descriptor set", le_destroy); - ZEND_FETCH_RESOURCE(wfds, fd_set*, arg3, -1, "File descriptor set", le_destroy); - ZEND_FETCH_RESOURCE(xfds, fd_set*, arg4, -1, "File descriptor set", le_destroy); + ZEND_FETCH_RESOURCE(php_sock, php_socket *, arg1, -1, "Socket", le_socket); + ZEND_FETCH_RESOURCE(rfds, fd_set *, arg2, -1, "File descriptor set", le_destroy); + ZEND_FETCH_RESOURCE(wfds, fd_set *, arg3, -1, "File descriptor set", le_destroy); + ZEND_FETCH_RESOURCE(xfds, fd_set *, arg4, -1, "File descriptor set", le_destroy); tv.tv_sec = Z_LVAL_PP(arg5); tv.tv_usec = Z_LVAL_PP(arg6); - RETURN_LONG(select(Z_LVAL_PP(arg1), rfds, wfds, xfds, &tv)); + RETURN_LONG(select(php_sock->socket, rfds, wfds, xfds, &tv)); } /* }}} */ |