cvs: php4(PHP_4_2_0) /ext/sockets sockets.c

From: Date: Wed, 01 May 2002 07:21:51 +0000
Subject: cvs: php4(PHP_4_2_0) /ext/sockets sockets.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11580@lists.php.net to get a copy of this message
mfischer Wed May 1 03:21:51 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4/ext/sockets sockets.c Log: - MFH fix for socket_select() and some minor memory leak; NEWS entry follows. Index: php4/ext/sockets/sockets.c diff -u php4/ext/sockets/sockets.c:1.95.2.1 php4/ext/sockets/sockets.c:1.95.2.2 --- php4/ext/sockets/sockets.c:1.95.2.1 Sat Mar 9 02:20:35 2002 +++ php4/ext/sockets/sockets.c Wed May 1 03:21:50 2002 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c,v 1.95.2.1 2002/03/09 07:20:35 jason Exp $ */ +/* $Id: sockets.c,v 1.95.2.2 2002/05/01 07:21:50 mfischer Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -97,6 +97,9 @@ static int le_socket; #define le_socket_name "Socket" +static unsigned char first_through_third_args_force_ref[] = +{3, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE}; + static unsigned char second_and_third_args_force_ref[] = {3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE}; @@ -118,7 +121,7 @@ PHP_FE(socket_iovec_fetch, NULL) PHP_FE(socket_iovec_add, NULL) PHP_FE(socket_iovec_delete, NULL) - PHP_FE(socket_select, NULL) + PHP_FE(socket_select, first_through_third_args_force_ref) PHP_FE(socket_create, NULL) PHP_FE(socket_create_listen, NULL) PHP_FE(socket_create_pair, NULL) @@ -480,7 +483,8 @@ /* Destroy old array, add new one */ zend_hash_destroy(Z_ARRVAL_P(sock_array)); - + efree(Z_ARRVAL_P(sock_array)); + zend_hash_internal_pointer_reset(new_hash); Z_ARRVAL_P(sock_array) = new_hash;

« previous php.cvs (#11580) next »