cvs: php-src(PHP_5_2) / NEWS /ext/curl multi.c

From: Date: Mon, 04 Sep 2006 16:31:28 +0000
Subject: cvs: php-src(PHP_5_2) / NEWS /ext/curl multi.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-40301@lists.php.net to get a copy of this message
iliaa Mon Sep 4 16:31:28 2006 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/curl multi.c Log: Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.233&r2=1.2027.2.547.2.234&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.233 php-src/NEWS:1.2027.2.547.2.234 --- php-src/NEWS:1.2027.2.547.2.233 Mon Sep 4 10:52:34 2006 +++ php-src/NEWS Mon Sep 4 16:31:27 2006 @@ -1,7 +1,8 @@ -PHP NEWS +'PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Sep 2006, PHP 5.2.0RC4 - Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry) +- Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia) - Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/multi.c?r1=1.19.2.3.2.2&r2=1.19.2.3.2.3&diff_format=u Index: php-src/ext/curl/multi.c diff -u php-src/ext/curl/multi.c:1.19.2.3.2.2 php-src/ext/curl/multi.c:1.19.2.3.2.3 --- php-src/ext/curl/multi.c:1.19.2.3.2.2 Sun Jun 11 01:42:16 2006 +++ php-src/ext/curl/multi.c Mon Sep 4 16:31:27 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: multi.c,v 1.19.2.3.2.2 2006/06/11 01:42:16 bjori Exp $ */ +/* $Id: multi.c,v 1.19.2.3.2.3 2006/09/04 16:31:27 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -62,7 +62,7 @@ mh = ecalloc(1, sizeof(php_curlm)); mh->multi = curl_multi_init(); - zend_llist_init(&mh->easyh, sizeof(zval *), (llist_dtor_func_t) ZVAL_PTR_DTOR, 0); + zend_llist_init(&mh->easyh, sizeof(zval *), (llist_dtor_func_t) NULL, 0); ZEND_REGISTER_RESOURCE(return_value, mh, le_curl_multi_handle); } @@ -76,6 +76,7 @@ zval *z_ch; php_curlm *mh; php_curl *ch; + zval tmp_val; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr", &z_mh, &z_ch) == FAILURE) { return; @@ -87,11 +88,11 @@ _php_curl_cleanup_handle(ch); ch->uses++; - /* we want to create a copy of this zval that we store in the multihandle - structure element "easyh" - so we separate it from the original - input zval to this function using SEPARATE_ZVAL */ - SEPARATE_ZVAL( &z_ch ); - zend_llist_add_element(&mh->easyh, &z_ch); + /* we want to create a copy of this zval that we store in the multihandle structure element "easyh" */ + tmp_val = *z_ch; + zval_copy_ctor(&tmp_val); + + zend_llist_add_element(&mh->easyh, &tmp_val); RETURN_LONG((long) curl_multi_add_handle(mh->multi, ch->cp)); } @@ -99,11 +100,11 @@ /* Used internally as comparison routine passed to zend_list_del_element */ -static int curl_compare_resources( zval **z1, zval **z2 ) +static int curl_compare_resources( zval *z1, zval **z2 ) { - return (Z_TYPE_PP( z1 ) == Z_TYPE_PP( z2 ) && - Z_TYPE_PP( z1 ) == IS_RESOURCE && - Z_LVAL_PP( z1 ) == Z_LVAL_PP( z2 ) ); + return (Z_TYPE_P( z1 ) == Z_TYPE_PP( z2 ) && + Z_TYPE_P( z1 ) == IS_RESOURCE && + Z_LVAL_P( z1 ) == Z_LVAL_PP( z2 ) ); }

« previous php.cvs (#40301) next »