felipe          Tue Jul 15 11:20:06 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/sockets        sockets.c 
  Log:
  - Reverted fix for #44197 (unsuitable for minor versions)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.17&r2=1.171.2.9.2.18&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.17 
php-src/ext/sockets/sockets.c:1.171.2.9.2.18
--- php-src/ext/sockets/sockets.c:1.171.2.9.2.17        Thu Feb 21 02:39:43 2008
+++ php-src/ext/sockets/sockets.c       Tue Jul 15 11:20:06 2008
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: sockets.c,v 1.171.2.9.2.17 2008/02/21 02:39:43 felipe Exp $ */
+/* $Id: sockets.c,v 1.171.2.9.2.18 2008/07/15 11:20:06 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -584,10 +584,7 @@
        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;
 
@@ -602,14 +599,8 @@
 
                if (PHP_SAFE_FD_ISSET(php_sock->bsd_socket, fds)) {
                        /* Add fd to new array */
-                       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;
-                       }
+                       zend_hash_next_index_insert(new_hash, (void *)element, 
sizeof(zval *), (void **)&dest_element);
+
                        if (dest_element) zval_add_ref(dest_element);
                }
                num++;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to