diff options
Diffstat (limited to 'ext/sockets')
| -rw-r--r-- | ext/sockets/php_sockets.h | 4 | ||||
| -rw-r--r-- | ext/sockets/php_sockets_win.c | 4 | ||||
| -rw-r--r-- | ext/sockets/php_sockets_win.h | 4 | ||||
| -rw-r--r-- | ext/sockets/sockets.c | 16 | ||||
| -rw-r--r-- | ext/sockets/unix_socket_constants.h | 4 | ||||
| -rw-r--r-- | ext/sockets/win32_socket_constants.h | 4 |
6 files changed, 23 insertions, 13 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 9a060c70d..01e1a2d8d 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36.2.1.2.4 2007/07/22 23:01:20 jani Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1.2.5 2007/12/31 07:20:11 sebastian Exp $ */ #if HAVE_SOCKETS diff --git a/ext/sockets/php_sockets_win.c b/ext/sockets/php_sockets_win.c index 44f8011a9..f1a7e2a69 100644 --- a/ext/sockets/php_sockets_win.c +++ b/ext/sockets/php_sockets_win.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sockets_win.c,v 1.12.2.1.2.2 2007/07/22 23:01:20 jani Exp $ */ +/* $Id: php_sockets_win.c,v 1.12.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */ #ifdef PHP_WIN32 diff --git a/ext/sockets/php_sockets_win.h b/ext/sockets/php_sockets_win.h index 75269c408..b5638de13 100644 --- a/ext/sockets/php_sockets_win.h +++ b/ext/sockets/php_sockets_win.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sockets_win.h,v 1.12.2.1.2.2 2007/07/22 23:01:20 jani Exp $ */ +/* $Id: php_sockets_win.h,v 1.12.2.1.2.3 2007/12/31 07:20:11 sebastian Exp $ */ #ifdef PHP_WIN32 diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 3ae93adcc..b73a25a7b 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.171.2.9.2.14 2007/09/26 10:55:07 tony2001 Exp $ */ +/* $Id: sockets.c,v 1.171.2.9.2.17 2008/02/21 02:39:43 felipe Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -584,7 +584,10 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds TSRMLS_DC) / zval **dest_element; php_socket *php_sock; HashTable *new_hash; + char *key; int num = 0; + ulong num_key; + uint key_len; if (Z_TYPE_P(sock_array) != IS_ARRAY) return 0; @@ -599,7 +602,14 @@ static int php_sock_array_from_fd_set(zval *sock_array, fd_set *fds TSRMLS_DC) / if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) { /* Add fd to new array */ - zend_hash_next_index_insert(new_hash, (void *)element, sizeof(zval *), (void **)&dest_element); + switch (zend_hash_get_current_key_ex(Z_ARRVAL_P(sock_array), &key, &key_len, &num_key, 0, NULL)) { + case HASH_KEY_IS_STRING: + zend_hash_add(new_hash, key, key_len, (void *)element, sizeof(zval *), (void **)&dest_element); + break; + case HASH_KEY_IS_LONG: + zend_hash_index_update(new_hash, num_key, (void *)element, sizeof(zval *), (void **)&dest_element); + break; + } if (dest_element) zval_add_ref(dest_element); } num++; diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index 4ffd17af6..fd40f8605 100644 --- a/ext/sockets/unix_socket_constants.h +++ b/ext/sockets/unix_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unix_socket_constants.h,v 1.5.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */ +/* $Id: unix_socket_constants.h,v 1.5.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */ /* This file is to be included by sockets.c */ diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index bcb648704..5528d24c8 100644 --- a/ext/sockets/win32_socket_constants.h +++ b/ext/sockets/win32_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2007 The PHP Group | + | Copyright (c) 1997-2008 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: win32_socket_constants.h,v 1.5.2.1.2.1 2007/01/01 09:36:07 sebastian Exp $ */ +/* $Id: win32_socket_constants.h,v 1.5.2.1.2.2 2007/12/31 07:20:11 sebastian Exp $ */ /* This file is to be included by sockets.c */ |
