[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Tue Feb 17 20:32:07 2004 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1541r2=1.1542ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1541 php-src/ChangeLog:1.1542 --- php-src/ChangeLog:1.1541Mon Feb 16 20:32:25 2004 +++ php-src/ChangeLog Tue Feb 17 20:32:06 2004 @@ -1,3 +1,82 @@ +2004-02-17 Jani Taskinen [EMAIL PROTECTED] + +* ZendEngine2/zend_list.c: + MFB: - Fix bug #26753 (zend_fetch_list_dtor_id() does not check NULL + strings) + +2004-02-17 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS + ext/gd/gd.c: + MFH: Fixed bug #27293 (two crashes inside image2wbmp()). + +* ext/gd/gd.c: + Fixed bug #27293 (two crashes inside image2wbmp()). + +2004-02-17 Ard Biesheuvel [EMAIL PROTECTED] + +* (PHP_4_3) + ext/interbase/interbase.c: + Really disallow persistent connections if ini option is set + +2004-02-17 Rob Richards [EMAIL PROTECTED] + +* ext/dom/php_dom.c: + add dtor to cleanup iterator related data + +2004-02-17 Ard Biesheuvel [EMAIL PROTECTED] + +* ext/interbase/ibase_blobs.c + ext/interbase/ibase_events.c + ext/interbase/interbase.c + ext/interbase/php_ibase_includes.h + ext/interbase/tests/004.phpt: + Fixed unregistered bugs in event handling + Cleaned up some of the code + Removed ISC_QUAD from static initializers because it looks different on + some platforms + +* ext/interbase/tests/004.phpt + ext/interbase/tests/008.phpt: + Added event handling test + CS + +2004-02-17 Wez Furlong [EMAIL PROTECTED] + +* ext/gettext/config.w32: + Fix: + +2004-02-17 Rob Richards [EMAIL PROTECTED] + +* ext/dom/dom_iterators.c + ext/dom/namednodemap.c + ext/dom/node.c + ext/dom/nodelist.c + ext/dom/php_dom.c + ext/dom/xpath.c: + implement clone functionality to fix segfault + DomNode-clone() creates new doc proxy if document is cloned + remove printf from xpath + fix remaining invalid object state issues + +2004-02-17 Jani Taskinen [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS + Zend/zend_list.c: + - Fixed bug #26753 (zend_fetch_list_dtor_id() does not check NULL strings). + +2004-02-17 Georg Richter [EMAIL PROTECTED] + +* ext/mysqli/tests/027.phpt: + changed output + +2004-02-17 Stig Bakken [EMAIL PROTECTED] + +* pear/PEAR/Frontend/CLI.php: + - apply bold escape codes only if output is going to a terminal/tty + 2004-02-16 Moriyoshi Koizumi [EMAIL PROTECTED] * .gdbinit:
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Tue Feb 17 20:32:11 2004 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.408r2=1.409ty=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.408 ZendEngine2/ChangeLog:1.409 --- ZendEngine2/ChangeLog:1.408 Mon Feb 16 20:32:28 2004 +++ ZendEngine2/ChangeLog Tue Feb 17 20:32:10 2004 @@ -1,3 +1,9 @@ +2004-02-17 Jani Taskinen [EMAIL PROTECTED] + +* zend_list.c: + MFB: - Fix bug #26753 (zend_fetch_list_dtor_id() does not check NULL + strings) + 2004-02-16 Derick Rethans [EMAIL PROTECTED] * ZEND_CHANGES: @@ -3473,7 +3479,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.408 2004/02/17 01:32:28 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.409 2004/02/18 01:32:10 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -5197,7 +5203,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.408 2004/02/17 01:32:28 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.409 2004/02/18 01:32:10 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c soap.c
dmitry Tue Feb 17 03:18:57 2004 EDT Modified files: /php-src/ext/soap php_encoding.c soap.c Log: Encoding of ommited tail parameters as NULLs http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.58r2=1.59ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.58 php-src/ext/soap/php_encoding.c:1.59 --- php-src/ext/soap/php_encoding.c:1.58Mon Feb 16 11:35:59 2004 +++ php-src/ext/soap/php_encoding.c Tue Feb 17 03:18:53 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.58 2004/02/16 16:35:59 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.59 2004/02/17 08:18:53 dmitry Exp $ */ #include time.h @@ -1071,6 +1071,15 @@ sdlTypePtr sdlType = type-sdl_type; TSRMLS_FETCH(); + if (!data || Z_TYPE_P(data) == IS_NULL) { + xmlParam = xmlNewNode(NULL,BOGUS); + xmlAddChild(parent, xmlParam); + if (style == SOAP_ENCODED) { + xmlSetProp(xmlParam, xsi:nil, 1); + } + return xmlParam; + } + if (sdlType) { prop = NULL; if (Z_TYPE_P(data) == IS_OBJECT) { http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.85r2=1.86ty=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.85 php-src/ext/soap/soap.c:1.86 --- php-src/ext/soap/soap.c:1.85Mon Feb 16 07:04:48 2004 +++ php-src/ext/soap/soap.c Tue Feb 17 03:18:53 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.85 2004/02/16 12:04:48 dmitry Exp $ */ +/* $Id: soap.c,v 1.86 2004/02/17 08:18:53 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2587,11 +2587,9 @@ } else { param = serialize_parameter(parameter, ret, 0, return, use, body TSRMLS_CC); if (function function-binding-bindingType == BINDING_SOAP) { - sdlParamPtr *sparam; - - if (zend_hash_index_find(function-responseParameters, 0, (void **)sparam) == SUCCESS (*sparam)-element) { - ns = encode_add_ns(param, (*sparam)-element-namens); - xmlNodeSetName(param, (*sparam)-element-name); + if (parameter parameter-element) { + ns = encode_add_ns(param, parameter-element-namens); + xmlNodeSetName(param, parameter-element-name); xmlSetNs(param, ns); } } else if (strcmp(param-name,return) == 0) { @@ -2619,11 +2617,9 @@ } else { param = serialize_parameter(parameter, *data, i, param_name, use, body TSRMLS_CC); if (function function-binding-bindingType == BINDING_SOAP) { - sdlParamPtr *sparam; - - if (zend_hash_index_find(function-responseParameters, i, (void **)sparam) == SUCCESS) { - ns = encode_add_ns(param, (*sparam)-encode-details.ns); - xmlNodeSetName(param, (*sparam)-encode-details.type_str); + if (parameter parameter-element) { + ns = encode_add_ns(param, parameter-element-namens); + xmlNodeSetName(param, parameter-element-name); xmlSetNs(param, ns); } } @@ -2911,16 +2907,38 @@ } else if (style == SOAP_DOCUMENT) { param = serialize_parameter(parameter, arguments[i], i, NULL, use, body TSRMLS_CC); if (function function-binding-bindingType == BINDING_SOAP) { - sdlParamPtr *sparam; - - if (zend_hash_index_find(function-requestParameters, i, (void **)sparam) == SUCCESS (*sparam)-element) { - ns = encode_add_ns(param, (*sparam)-element-namens); - xmlNodeSetName(param, (*sparam)-element-name); + if (parameter parameter-element) { + ns = encode_add_ns(param, parameter-element-namens); + xmlNodeSetName(param, parameter-element-name);
[PHP-CVS] cvs: php-src /ext/soap php_sdl.c
dmitry Tue Feb 17 04:23:30 2004 EDT Modified files: /php-src/ext/soap php_sdl.c Log: fix: Using proper namespace for soap:header if it is not specified. http://cvs.php.net/diff.php/php-src/ext/soap/php_sdl.c?r1=1.60r2=1.61ty=u Index: php-src/ext/soap/php_sdl.c diff -u php-src/ext/soap/php_sdl.c:1.60 php-src/ext/soap/php_sdl.c:1.61 --- php-src/ext/soap/php_sdl.c:1.60 Mon Feb 16 11:32:52 2004 +++ php-src/ext/soap/php_sdl.c Tue Feb 17 04:23:28 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_sdl.c,v 1.60 2004/02/16 16:32:52 dmitry Exp $ */ +/* $Id: php_sdl.c,v 1.61 2004/02/17 09:23:28 dmitry Exp $ */ #include php_soap.h #include libxml/uri.h @@ -390,19 +390,6 @@ memset(h, 0, sizeof(sdlSoapBindingFunctionHeader)); h-name = estrdup(tmp-children-content); - tmp = get_attribute(part-properties, type); - if (tmp != NULL) { - h-encode = get_encoder_from_prefix(ctx-sdl, part, tmp-children-content); - } else { - tmp = get_attribute(part-properties, element); - if (tmp != NULL) { - h-element = get_element(ctx-sdl, part, tmp-children-content); - if (h-element) { - h-encode = h-element-encode; - } - } - } - tmp = get_attribute(header-properties, use); if (tmp !strncmp(tmp-children-content, encoded, sizeof(encoded))) { h-use = SOAP_ENCODED; @@ -428,6 +415,22 @@ } } + tmp = get_attribute(part-properties, type); + if (tmp != NULL) { + h-encode = get_encoder_from_prefix(ctx-sdl, part, tmp-children-content); + } else { + tmp = get_attribute(part-properties, element); + if (tmp != NULL) { + h-element = get_element(ctx-sdl, part, tmp-children-content); + if (h-element) { + h-encode = h-element-encode; + if (!h-ns h-element-namens) { + h-ns = estrdup(h-element-namens); + } + } + } + } + if (binding-headers == NULL) { binding-headers = emalloc(sizeof(HashTable)); zend_hash_init(binding-headers, 0, NULL, delete_header, 0); @@ -874,7 +877,7 @@ return ctx.sdl; } -#define WSDL_CACHE_VERSION 01 +#define WSDL_CACHE_VERSION 02 #define WSDL_CACHE_GET(ret,type,buf) memcpy(ret,*buf,sizeof(type)); *buf += sizeof(type); #define WSDL_CACHE_GET_INT(ret,buf)ret = ((int)(*buf)[0])|((int)(*buf)[1]8)|((int)(*buf)[2]16)|((int)(*buf)[3]24); *buf += 4; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: CVSROOT / avail
wez Tue Feb 17 04:45:41 2004 EDT Modified files: /CVSROOTavail Log: memcache karma for tony http://cvs.php.net/diff.php/CVSROOT/avail?r1=1.829r2=1.830ty=u Index: CVSROOT/avail diff -u CVSROOT/avail:1.829 CVSROOT/avail:1.830 --- CVSROOT/avail:1.829 Fri Feb 13 14:58:24 2004 +++ CVSROOT/avail Tue Feb 17 04:45:39 2004 @@ -202,6 +202,7 @@ avail|wenlong|pecl/freeimage avail|marcot|pecl/pop3 avail|jstump|pear/Payment_Process +avail|tony2001|pecl/memcache # Curl modules avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/dom dom_iterators.c namednodemap.c node.c nodelist.c php_dom.c xpath.c
rrichards Tue Feb 17 06:13:48 2004 EDT Modified files: /php-src/ext/domdom_iterators.c namednodemap.c node.c nodelist.c php_dom.c xpath.c Log: implement clone functionality to fix segfault DomNode-clone() creates new doc proxy if document is cloned remove printf from xpath fix remaining invalid object state issues http://cvs.php.net/diff.php/php-src/ext/dom/dom_iterators.c?r1=1.6r2=1.7ty=u Index: php-src/ext/dom/dom_iterators.c diff -u php-src/ext/dom/dom_iterators.c:1.6 php-src/ext/dom/dom_iterators.c:1.7 --- php-src/ext/dom/dom_iterators.c:1.6 Tue Jan 20 06:35:32 2004 +++ php-src/ext/dom/dom_iterators.c Tue Feb 17 06:13:47 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: dom_iterators.c,v 1.6 2004/01/20 11:35:32 rrichards Exp $ */ +/* $Id: dom_iterators.c,v 1.7 2004/02/17 11:13:47 rrichards Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -268,33 +268,35 @@ intern = (dom_object *)zend_object_store_get_object(object TSRMLS_CC); objmap = (dom_nnodemap_object *)intern-ptr; - if (objmap-ht == NULL) { - if (objmap-nodetype == DOM_NODESET) { - nodeht = HASH_OF(objmap-baseobjptr); - zend_hash_internal_pointer_reset(nodeht); - if (zend_hash_get_current_data(nodeht, (void **) entry)==SUCCESS) { - curattr = *entry; - curattr-refcount++; - } - } else { - nodep = (xmlNode *)dom_object_get_node(objmap-baseobj); - if (objmap-nodetype == XML_ATTRIBUTE_NODE || objmap-nodetype == XML_ELEMENT_NODE) { - if (objmap-nodetype == XML_ATTRIBUTE_NODE) { - curnode = (xmlNodePtr) nodep-properties; - } else { - curnode = (xmlNodePtr) nodep-children; + if (objmap != NULL) { + if (objmap-ht == NULL) { + if (objmap-nodetype == DOM_NODESET) { + nodeht = HASH_OF(objmap-baseobjptr); + zend_hash_internal_pointer_reset(nodeht); + if (zend_hash_get_current_data(nodeht, (void **) entry)==SUCCESS) { + curattr = *entry; + curattr-refcount++; } } else { - if (nodep-type == XML_DOCUMENT_NODE || nodep-type == XML_HTML_DOCUMENT_NODE) { - nodep = xmlDocGetRootElement((xmlDoc *) nodep); + nodep = (xmlNode *)dom_object_get_node(objmap-baseobj); + if (objmap-nodetype == XML_ATTRIBUTE_NODE || objmap-nodetype == XML_ELEMENT_NODE) { + if (objmap-nodetype == XML_ATTRIBUTE_NODE) { + curnode = (xmlNodePtr) nodep-properties; + } else { + curnode = (xmlNodePtr) nodep-children; + } } else { - nodep = nodep-children; + if (nodep-type == XML_DOCUMENT_NODE || nodep-type == XML_HTML_DOCUMENT_NODE) { + nodep = xmlDocGetRootElement((xmlDoc *) nodep); + } else { + nodep = nodep-children; + } + curnode = dom_get_elements_by_tag_name_ns_raw(nodep, objmap-ns, objmap-local, curindex, 0); } - curnode = dom_get_elements_by_tag_name_ns_raw(nodep, objmap-ns, objmap-local, curindex, 0); } + } else { + curnode = php_dom_libxml_hash_iter(objmap-ht, 0); } - } else { - curnode = php_dom_libxml_hash_iter(objmap-ht, 0); } if (curnode) { http://cvs.php.net/diff.php/php-src/ext/dom/namednodemap.c?r1=1.8r2=1.9ty=u Index: php-src/ext/dom/namednodemap.c diff -u php-src/ext/dom/namednodemap.c:1.8 php-src/ext/dom/namednodemap.c:1.9 --- php-src/ext/dom/namednodemap.c:1.8 Thu Jan 22 16:16:05 2004 +++ php-src/ext/dom/namednodemap.c Tue Feb 17 06:13:47 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: namednodemap.c,v 1.8 2004/01/22 21:16:05 rrichards Exp $ */ +/* $Id: namednodemap.c,v 1.9 2004/02/17 11:13:47 rrichards
[PHP-CVS] cvs: php-src /ext/gettext config.w32
wez Tue Feb 17 06:15:20 2004 EDT Modified files: /php-src/ext/gettextconfig.w32 Log: Fix: #27269 php_gettext.dll extension will not load http://cvs.php.net/diff.php/php-src/ext/gettext/config.w32?r1=1.1r2=1.2ty=u Index: php-src/ext/gettext/config.w32 diff -u php-src/ext/gettext/config.w32:1.1 php-src/ext/gettext/config.w32:1.2 --- php-src/ext/gettext/config.w32:1.1 Fri Dec 19 10:04:20 2003 +++ php-src/ext/gettext/config.w32 Tue Feb 17 06:15:19 2004 @@ -1,11 +1,11 @@ -// $Id: config.w32,v 1.1 2003/12/19 15:04:20 wez Exp $ +// $Id: config.w32,v 1.2 2004/02/17 11:15:19 wez Exp $ // vim:ft=javascript ARG_WITH(gettext, gettext support, no); if (PHP_GETTEXT != no) { if (CHECK_LIB(libintl.lib, gettext, PHP_GETTEXT) CHECK_HEADER_ADD_INCLUDE(libintl.h, CFLAGS_GETTEXT)) { - EXTENSION(gettext, gettext.c, PHP_GETTEXT_SHARED, -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_DNGETTEXT=1 -DHAVE_NGETTEXT=1); + EXTENSION(gettext, gettext.c, PHP_GETTEXT_SHARED, -DHAVE_BIND_TEXTDOMAIN_CODESET=1 -DHAVE_DNGETTEXT=1 -DHAVE_NGETTEXT=1 -DHAVE_LIBINTL=1); } else { WARNING(gettext not enabled; libraries and headers not found); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/interbase/tests 004.phpt 008.phpt
abies Tue Feb 17 07:24:43 2004 EDT Added files: /php-src/ext/interbase/tests008.phpt Modified files: /php-src/ext/interbase/tests004.phpt Log: Added event handling test CS http://cvs.php.net/diff.php/php-src/ext/interbase/tests/004.phpt?r1=1.10r2=1.11ty=u Index: php-src/ext/interbase/tests/004.phpt diff -u php-src/ext/interbase/tests/004.phpt:1.10 php-src/ext/interbase/tests/004.phpt:1.11 --- php-src/ext/interbase/tests/004.phpt:1.10 Fri Sep 5 13:02:02 2003 +++ php-src/ext/interbase/tests/004.phptTue Feb 17 07:24:42 2004 @@ -5,14 +5,14 @@ --POST-- --GET-- --FILE-- -?php /* $Id: 004.phpt,v 1.10 2003/09/05 17:02:02 abies Exp $ */ +?php /* $Id: 004.phpt,v 1.11 2004/02/17 12:24:42 abies Exp $ */ require(interbase.inc); -ibase_connect($test_base); +$link = ibase_connect($test_base); ibase_query( - create table test4 ( + CREATE TABLE test4 ( v_integer integer, v_blob blob)); ibase_commit(); @@ -28,10 +28,14 @@ echo import blob 1\n; $ftmp = fopen($name,r); $bl_s = ibase_blob_import($ftmp); -ibase_query(insert into test4 (v_integer, v_blob) values (1, ?), $bl_s); +ibase_query(INSERT INTO test4 (v_integer, v_blob) VALUES (1, ?), $bl_s); + +$bl_s = ibase_blob_import($ftmp,$link); +ibase_query($link, INSERT INTO test4 (v_integer, v_blob) VALUES (1, ?), $bl_s); echo test blob 1\n; -$q = ibase_query(select v_blob from test4 where v_integer = 1); +$q = ibase_query(SELECT v_blob FROM test4 WHERE v_integer = 1); + $row = ibase_fetch_object($q); $bl_h = ibase_blob_open($row-V_BLOB); @@ -42,7 +46,7 @@ echo BLOB 1 fail (1)\n; ibase_blob_close($bl_h); -$bl_h = ibase_blob_open($row-V_BLOB); +$bl_h = ibase_blob_open($row-V_BLOB,$link); $blob = ''; while($piece = ibase_blob_get($bl_h, 100 * 1024)) @@ -55,11 +59,11 @@ echo create blob 2\n; -ibase_query(insert into test4 (v_integer, v_blob) values (2, ?), $blob_str); +ibase_query(INSERT INTO test4 (v_integer, v_blob) VALUES (2, ?), $blob_str); echo test blob 2\n; -$q = ibase_query(select v_blob from test4 where v_integer = 2); +$q = ibase_query(SELECT v_blob FROM test4 WHERE v_integer = 2); $row = ibase_fetch_object($q,IBASE_TEXT); if($row-V_BLOB != $blob_str) @@ -70,7 +74,7 @@ echo create blob 3\n; -$bl_h = ibase_blob_create(); +$bl_h = ibase_blob_create($link); ibase_blob_add($bl_h, +--+\n); ibase_blob_add($bl_h, | PHP HTML Embedded Scripting Language Version 3.0 |\n); @@ -97,21 +101,21 @@ ibase_blob_add($bl_h, | contact [EMAIL PROTECTED] |\n); ibase_blob_add($bl_h, +--+\n); $bl_s = ibase_blob_close($bl_h); -ibase_query(insert into test4 (v_integer, v_blob) values (3, ?), $bl_s); +ibase_query(INSERT INTO test4 (v_integer, v_blob) VALUES (3, ?), $bl_s); ibase_commit(); echo echo blob 3\n; -$q = ibase_query(select v_blob from test4 where v_integer = 3); +$q = ibase_query(SELECT v_blob FROM test4 WHERE v_integer = 3); $row = ibase_fetch_object($q); ibase_commit(); ibase_close(); ibase_connect($test_base); -ibase_blob_echo($row-V_BLOB); +ibase_blob_echo($row-V_BLOB, $link); ibase_free_result($q); echo fetch blob 3\n; -$q = ibase_query(select v_blob from test4 where v_integer = 3); +$q = ibase_query(SELECT v_blob FROM test4 WHERE v_integer = 3); $row = ibase_fetch_object($q,IBASE_TEXT); echo $row-V_BLOB; ibase_free_result($q); http://cvs.php.net/co.php/php-src/ext/interbase/tests/008.phpt?r=1.1p=1 Index: php-src/ext/interbase/tests/008.phpt +++ php-src/ext/interbase/tests/008.phpt --TEST-- InterBase: event handling --SKIPIF-- ?php include(skipif.inc); ? --POST-- --GET-- --FILE-- ?php /* $Id: 008.phpt,v 1.1 2004/02/17 12:24:42 abies Exp $ */ require(interbase.inc); $count = 0; function event_callback($event) { global $count; if ($event == 'TEST1') echo FAIL TEST1\n; return (++$count 5); /* cancel event */ } $link = ibase_connect($test_base); ibase_query(CREATE PROCEDURE pevent AS BEGIN POST_EVENT 'TEST1'; POST_EVENT 'TEST2'; END); ibase_commit(); $e = ibase_set_event_handler('event_callback','TEST1'); ibase_free_event_handler($e); ibase_set_event_handler('event_callback','TEST2'); usleep(5E+5); for ($i = 0; $i 8; ++$i) { ibase_query(EXECUTE PROCEDURE pevent); ibase_commit(); usleep(3E+5); } usleep(5E+5); if (!$count || $count 5) echo FAIL ($count)\n; echo end of test\n; ? --EXPECT-- end of test -- PHP CVS Mailing List
[PHP-CVS] cvs: php-src /ext/interbase ibase_blobs.c ibase_events.c interbase.c php_ibase_includes.h /ext/interbase/tests 004.phpt
abies Tue Feb 17 07:53:55 2004 EDT Modified files: /php-src/ext/interbase ibase_blobs.c ibase_events.c interbase.c php_ibase_includes.h /php-src/ext/interbase/tests004.phpt Log: Fixed unregistered bugs in event handling Cleaned up some of the code Removed ISC_QUAD from static initializers because it looks different on some platforms http://cvs.php.net/diff.php/php-src/ext/interbase/ibase_blobs.c?r1=1.4r2=1.5ty=u Index: php-src/ext/interbase/ibase_blobs.c diff -u php-src/ext/interbase/ibase_blobs.c:1.4 php-src/ext/interbase/ibase_blobs.c:1.5 --- php-src/ext/interbase/ibase_blobs.c:1.4 Mon Feb 2 08:47:56 2004 +++ php-src/ext/interbase/ibase_blobs.c Tue Feb 17 07:53:53 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: ibase_blobs.c,v 1.4 2004/02/02 13:47:56 abies Exp $ */ +/* $Id: ibase_blobs.c,v 1.5 2004/02/17 12:53:53 abies Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -86,7 +86,8 @@ for (cur_len = stat = 0; (stat == 0 || stat == isc_segment) cur_len max_len; cur_len += seg_len) { - unsigned short chunk_size = (max_len-cur_len) USHRT_MAX ? USHRT_MAX : (unsigned short)(max_len-cur_len); + unsigned short chunk_size = (max_len-cur_len) USHRT_MAX ? USHRT_MAX + : (unsigned short)(max_len-cur_len); stat = isc_get_segment(IB_STATUS, ib_blob-bl_handle, seg_len, chunk_size, bl_data[cur_len]); } @@ -183,32 +184,18 @@ Create blob for adding data */ PHP_FUNCTION(ibase_blob_create) { - zval **link_arg; + zval *link = NULL; ibase_db_link *ib_link; ibase_trans *trans = NULL; ibase_blob *ib_blob; RESET_ERRMSG; - - switch (ZEND_NUM_ARGS()) { - case 0: - ZEND_FETCH_RESOURCE2(ib_link, ibase_db_link *, NULL, IBG(default_link), InterBase link, le_link, le_plink); - break; - case 1: - if (zend_get_parameters_ex(1, link_arg) == FAILURE) { - RETURN_FALSE; - } - _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, link_arg, ib_link, trans); - break; - default: - WRONG_PARAM_COUNT; - break; - } - /* open default transaction */ - if (_php_ibase_def_trans(ib_link, trans TSRMLS_CC) == FAILURE) { + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |r, link)) { RETURN_FALSE; } + + PHP_IBASE_LINK_TRANS(link, ib_link, trans); ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob)); ib_blob-bl_handle = NULL; @@ -228,56 +215,55 @@ Open blob for retrieving data parts */ PHP_FUNCTION(ibase_blob_open) { - zval **blob_arg, **link_arg; - ibase_db_link *link; + char *blob_id; + int blob_id_len; + zval *link = NULL; + ibase_db_link *ib_link; ibase_trans *trans = NULL; ibase_blob *ib_blob; RESET_ERRMSG; switch (ZEND_NUM_ARGS()) { - + default: + WRONG_PARAM_COUNT; case 1: - if (zend_get_parameters_ex(1, blob_arg) != SUCCESS) { - WRONG_PARAM_COUNT; + if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, s, blob_id, blob_id_len)) { + RETURN_FALSE; } - ZEND_FETCH_RESOURCE2(link, ibase_db_link *, NULL, IBG(default_link), InterBase link, le_link, le_plink); break; case 2: - if (zend_get_parameters_ex(2, link_arg, blob_arg) != SUCCESS) { - WRONG_PARAM_COUNT; + if (FAILURE == zend_parse_parameters(2 TSRMLS_CC, rs, link, blob_id, blob_id_len)) { + RETURN_FALSE; } - _php_ibase_get_link_trans(INTERNAL_FUNCTION_PARAM_PASSTHRU, link_arg, link, trans); break; - default: - WRONG_PARAM_COUNT; } - - convert_to_string_ex(blob_arg); + + PHP_IBASE_LINK_TRANS(link, ib_link, trans); ib_blob = (ibase_blob *) emalloc(sizeof(ibase_blob)); ib_blob-bl_handle = NULL; ib_blob-type = BLOB_OUTPUT; - if (! _php_ibase_string_to_quad(Z_STRVAL_PP(blob_arg), (ib_blob-bl_qd))) { - _php_ibase_module_error(String is not a BLOB ID TSRMLS_CC); - efree(ib_blob); - RETURN_FALSE; -
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c php_schema.c php_sdl.c soap.c
dmitry Tue Feb 17 10:10:18 2004 EDT Modified files: /php-src/ext/soap php_encoding.c php_schema.c php_sdl.c soap.c Log: support for XMLSchema element nillable attribute http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.59r2=1.60ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.59 php-src/ext/soap/php_encoding.c:1.60 --- php-src/ext/soap/php_encoding.c:1.59Tue Feb 17 03:18:53 2004 +++ php-src/ext/soap/php_encoding.c Tue Feb 17 10:10:16 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.59 2004/02/17 08:18:53 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.60 2004/02/17 15:10:16 dmitry Exp $ */ #include time.h @@ -108,7 +108,7 @@ if (!zval || Z_TYPE_P(zval) == IS_NULL) { \ if (style == SOAP_ENCODED) {\ xmlSetProp(xml, xsi:nil, 1); \ - }\ + } \ return xml; \ } \ } @@ -979,12 +979,34 @@ zend_hash_internal_pointer_reset(ht); while (zend_hash_get_current_data(ht,(void**)val) == SUCCESS) { - property = master_to_xml(enc, *val, style, node); + if (Z_TYPE_PP(val) == IS_NULL model-u.element-nillable) { + property = xmlNewNode(NULL,BOGUS); + xmlAddChild(node, property); + if (style == SOAP_ENCODED) { + xmlSetProp(property, xsi:nil, 1); + } else { + xmlNsPtr xsi = encode_add_ns(property,XSI_NAMESPACE); + xmlSetNsProp(property, xsi, nil, 1); + } + } else { + property = master_to_xml(enc, *val, style, node); + } xmlNodeSetName(property, model-u.element-name); zend_hash_move_forward(ht); } } else { - property = master_to_xml(enc, *data, style, node); + if (Z_TYPE_PP(data) == IS_NULL model-u.element-nillable) { + property = xmlNewNode(NULL,BOGUS); + xmlAddChild(node, property); + if (style == SOAP_ENCODED) { + xmlSetProp(property, xsi:nil, 1); + } else { + xmlNsPtr xsi = encode_add_ns(property,XSI_NAMESPACE); + xmlSetNsProp(property, xsi, nil, 1); + } + } else { + property = master_to_xml(enc, *data, style, node); + } xmlNodeSetName(property, model-u.element-name); } return 1; @@ -1149,7 +1171,19 @@ zend_hash_internal_pointer_reset(prop); while (zend_hash_get_current_data(prop,(void**)val) == SUCCESS) { - xmlNodePtr property = master_to_xml(array_el-encode, *val, style, xmlParam); + xmlNodePtr property; + if (Z_TYPE_PP(val) == IS_NULL array_el-nillable) { + property = xmlNewNode(NULL,BOGUS); + xmlAddChild(xmlParam, property); + if (style == SOAP_ENCODED) { + xmlSetProp(property, xsi:nil, 1); + } else { + xmlNsPtr xsi = encode_add_ns(property,XSI_NAMESPACE); + xmlSetNsProp(property, xsi, nil, 1); +
[PHP-CVS] cvs: php-src /ext/soap php_encoding.c
dmitry Tue Feb 17 13:54:30 2004 EDT Modified files: /php-src/ext/soap php_encoding.c Log: Using element namesapces with literal encoding. http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.60r2=1.61ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.60 php-src/ext/soap/php_encoding.c:1.61 --- php-src/ext/soap/php_encoding.c:1.60Tue Feb 17 10:10:16 2004 +++ php-src/ext/soap/php_encoding.c Tue Feb 17 13:54:30 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_encoding.c,v 1.60 2004/02/17 15:10:16 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.61 2004/02/17 18:54:30 dmitry Exp $ */ #include time.h @@ -992,6 +992,10 @@ property = master_to_xml(enc, *val, style, node); } xmlNodeSetName(property, model-u.element-name); + if (style == SOAP_LITERAL model-u.element-namens) { + xmlNsPtr nsp = encode_add_ns(property, model-u.element-namens); + xmlSetNs(property, nsp); + } zend_hash_move_forward(ht); } } else { @@ -1008,6 +1012,10 @@ property = master_to_xml(enc, *data, style, node); } xmlNodeSetName(property, model-u.element-name); + if (style == SOAP_LITERAL model-u.element-namens) { + xmlNsPtr nsp = encode_add_ns(property, model-u.element-namens); + xmlSetNs(property, nsp); + } } return 1; } else if (model-min_occurs == 0) { @@ -1162,8 +1170,8 @@ if (prop != NULL) { sdlTypePtr array_el; - if (Z_TYPE_P(data) == IS_ARRAY - !is_map(data) + if (Z_TYPE_P(data) == IS_ARRAY + !is_map(data) sdlType-attributes == NULL sdlType-model != NULL (array_el = model_array_element(sdlType-model)) != NULL) { @@ -1185,6 +1193,10 @@ property = master_to_xml(array_el-encode, *val, style, xmlParam); } xmlNodeSetName(property, array_el-name); + if (style == SOAP_LITERAL array_el-namens) { + xmlNsPtr nsp = encode_add_ns(property, array_el-namens); + xmlSetNs(property, nsp); + } zend_hash_move_forward(prop); } } else if (sdlType-model) { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/interbase interbase.c
abies Tue Feb 17 15:57:27 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/interbase interbase.c Log: Really disallow persistent connections if ini option is set http://cvs.php.net/diff.php/php-src/ext/interbase/interbase.c?r1=1.91.2.30r2=1.91.2.31ty=u Index: php-src/ext/interbase/interbase.c diff -u php-src/ext/interbase/interbase.c:1.91.2.30 php-src/ext/interbase/interbase.c:1.91.2.31 --- php-src/ext/interbase/interbase.c:1.91.2.30 Sun Feb 15 13:43:46 2004 +++ php-src/ext/interbase/interbase.c Tue Feb 17 15:57:26 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: interbase.c,v 1.91.2.30 2004/02/15 18:43:46 abies Exp $ */ +/* $Id: interbase.c,v 1.91.2.31 2004/02/17 20:57:26 abies Exp $ */ /* TODO: Arrays, roles? @@ -643,7 +643,7 @@ php_info_print_table_start(); php_info_print_table_row(2, Interbase Support, enabled); - php_info_print_table_row(2, Revision, $Revision: 1.91.2.30 $); + php_info_print_table_row(2, Revision, $Revision: 1.91.2.31 $); #ifdef COMPILE_DL_INTERBASE php_info_print_table_row(2, Dynamic Module, yes); #endif @@ -945,7 +945,7 @@ Open a persistent connection to an InterBase database */ PHP_FUNCTION(ibase_pconnect) { - _php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); + _php_ibase_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU, IBG(allow_persistent)); } /* }}} */ -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd gd.c
iliaa Tue Feb 17 16:30:02 2004 EDT Modified files: /php-src/ext/gd gd.c Log: Fixed bug #27293 (two crashes inside image2wbmp()). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.285r2=1.286ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.285 php-src/ext/gd/gd.c:1.286 --- php-src/ext/gd/gd.c:1.285 Tue Jan 27 20:36:53 2004 +++ php-src/ext/gd/gd.c Tue Feb 17 16:30:00 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.285 2004/01/28 01:36:53 iliaa Exp $ */ +/* $Id: gd.c,v 1.286 2004/02/17 21:30:00 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1724,6 +1724,8 @@ if (q 0 || q 255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid threshold value '%d'. It must be between 0 and 255, q); } + gdImageWBMP(im, q, fp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, fp, q); break; @@ -1766,6 +1768,8 @@ if (q 0 || q 255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid threshold value '%d'. It must be between 0 and 255, q); } + gdImageWBMP(im, q, tmp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, tmp, q); break; @@ -3741,6 +3745,10 @@ return; } + if (im_org-trueColor) { + gdImageTrueColorToPalette(im_org, 1, 256); + } + for (y = 0; y dest_height; y++) { for (x = 0; x dest_width; x++) { color_org = gdImageGetPixel(im_org, x, y); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/gd gd.c
iliaa Tue Feb 17 16:30:59 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/gd gd.c Log: MFH: Fixed bug #27293 (two crashes inside image2wbmp()). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.569r2=1.1247.2.570ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.569 php-src/NEWS:1.1247.2.570 --- php-src/NEWS:1.1247.2.569 Tue Feb 17 05:39:17 2004 +++ php-src/NEWSTue Feb 17 16:30:55 2004 @@ -1,6 +1,7 @@ PHP 4 NEWS ||| ?? Feb 2004, Version 4.3.5 +- Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia) - Fixed bug #27278 (*printf() functions treat arguments as if passed by reference). (Ilia) - Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings). http://cvs.php.net/diff.php/php-src/ext/gd/gd.c?r1=1.221.2.34r2=1.221.2.35ty=u Index: php-src/ext/gd/gd.c diff -u php-src/ext/gd/gd.c:1.221.2.34 php-src/ext/gd/gd.c:1.221.2.35 --- php-src/ext/gd/gd.c:1.221.2.34 Tue Jan 27 20:38:15 2004 +++ php-src/ext/gd/gd.c Tue Feb 17 16:30:57 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: gd.c,v 1.221.2.34 2004/01/28 01:38:15 iliaa Exp $ */ +/* $Id: gd.c,v 1.221.2.35 2004/02/17 21:30:57 iliaa Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1620,6 +1620,8 @@ if(q0||q255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid threshold value '%d'. It must be between 0 and 255, q); } + gdImageWBMP(im, q, fp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, fp, q); break; @@ -1662,6 +1664,8 @@ if(q0||q255) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid threshold value '%d'. It must be between 0 and 255, q); } + gdImageWBMP(im, q, tmp); + break; case PHP_GDIMG_TYPE_JPG: (*func_p)(im, tmp, q); break; @@ -3625,6 +3629,10 @@ return; } + if (im_org-trueColor) { + gdImageTrueColorToPalette(im_org, 1, 256); + } + for (y = 0; y dest_height; y++) { for (x = 0; x dest_width; x++) { color_org = gdImageGetPixel (im_org, x, y); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/wddx/tests bug27287.phpt
sniper Tue Feb 17 19:00:38 2004 EDT Added files: /php-src/ext/wddx/tests bug27287.phpt Log: Test for bug #27287 http://cvs.php.net/co.php/php-src/ext/wddx/tests/bug27287.phpt?r=1.1p=1 Index: php-src/ext/wddx/tests/bug27287.phpt +++ php-src/ext/wddx/tests/bug27287.phpt --TEST-- Bug #27287 (segfault with deserializing object data) --FILE-- ?php class foo { } $foo = new foo(); $foo-abc = 'def'; $string = wddx_serialize_value($foo); $bar = wddx_deserialize($string); echo OK\n; ? --EXPECT-- OK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/wddx/tests bug27287.phpt
sniper Tue Feb 17 19:01:05 2004 EDT Added files: (Branch: PHP_4_3) /php-src/ext/wddx/tests bug27287.phpt Log: MFH http://cvs.php.net/co.php/php-src/ext/wddx/tests/bug27287.phpt?r=1.1p=1 Index: php-src/ext/wddx/tests/bug27287.phpt +++ php-src/ext/wddx/tests/bug27287.phpt --TEST-- Bug #27287 (segfault with deserializing object data) --FILE-- ?php class foo { } $foo = new foo(); $foo-abc = 'def'; $string = wddx_serialize_value($foo); $bar = wddx_deserialize($string); echo OK\n; ? --EXPECT-- OK -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard info.c
pollita Wed Feb 18 00:07:15 2004 EDT Modified files: /php-src/ext/standard info.c Log: Show registered transports in phpinfo() http://cvs.php.net/diff.php/php-src/ext/standard/info.c?r1=1.241r2=1.242ty=u Index: php-src/ext/standard/info.c diff -u php-src/ext/standard/info.c:1.241 php-src/ext/standard/info.c:1.242 --- php-src/ext/standard/info.c:1.241 Thu Jan 8 03:17:32 2004 +++ php-src/ext/standard/info.c Wed Feb 18 00:07:13 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: info.c,v 1.241 2004/01/08 08:17:32 andi Exp $ */ +/* $Id: info.c,v 1.242 2004/02/18 05:07:13 pollita Exp $ */ #include php.h #include php_ini.h @@ -502,6 +502,47 @@ php_info_print_table_row(2, PHP Streams, disabled); /* ?? */ } } + + { + HashTable *stream_xport_hash; + char *xport_name, *xport_buf = NULL; + int xport_name_len, xport_buf_len = 0, xport_buf_size = 0; + ulong num_key; + + if ((stream_xport_hash = php_stream_xport_get_hash())) { + for(zend_hash_internal_pointer_reset(stream_xport_hash); + zend_hash_get_current_key_ex(stream_xport_hash, xport_name, xport_name_len, num_key, 0, NULL) == HASH_KEY_IS_STRING; + zend_hash_move_forward(stream_xport_hash)) { + if (xport_buf_len + xport_name_len + 3 xport_buf_size) { + while (xport_buf_len + xport_name_len + 3 xport_buf_size) { + xport_buf_size += 256; + } + if (xport_buf) { + xport_buf = erealloc(xport_buf, xport_buf_size); + } else { + xport_buf = emalloc(xport_buf_size); + } + } + if (xport_buf_len 0) { + xport_buf[xport_buf_len++] = ','; + xport_buf[xport_buf_len++] = ' '; + } + memcpy(xport_buf + xport_buf_len, xport_name, xport_name_len); + xport_buf_len += xport_name_len; + xport_buf[xport_buf_len] = '\0'; + } + if (xport_buf) { + php_info_print_table_row(2, Registered Stream Socket Transports, xport_buf); + efree(xport_buf); + } else { + /* Any chances we will ever hit this? */ + php_info_print_table_row(2, Registered Stream Socket Transports, no transports registered); + } + } else { + /* Any chances we will ever hit this? */ + php_info_print_table_row(2, Stream Socket Transports, disabled); /* ?? */ + } + } php_info_print_table_end(); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap php_http.c
dmitry Wed Feb 18 01:58:34 2004 EDT Modified files: /php-src/ext/soap php_http.c Log: BUGFIX: HTTP chunked transfer-encoding support http://cvs.php.net/diff.php/php-src/ext/soap/php_http.c?r1=1.42r2=1.43ty=u Index: php-src/ext/soap/php_http.c diff -u php-src/ext/soap/php_http.c:1.42 php-src/ext/soap/php_http.c:1.43 --- php-src/ext/soap/php_http.c:1.42Mon Feb 16 04:56:30 2004 +++ php-src/ext/soap/php_http.c Wed Feb 18 01:58:33 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: php_http.c,v 1.42 2004/02/16 09:56:30 dmitry Exp $ */ +/* $Id: php_http.c,v 1.43 2004/02/18 06:58:33 dmitry Exp $ */ #include php_soap.h #include ext/standard/base64.h @@ -642,26 +642,41 @@ content_length = get_http_header_value(headers, Content-Length: ); if (trans_enc !strcmp(trans_enc, chunked)) { - int buf_size = 0, len_size; char done, chunk_size[10]; done = FALSE; http_buf = NULL; while (!done) { - php_stream_gets(stream, chunk_size, sizeof(chunk_size)); - - if (sscanf(chunk_size, %x, buf_size) != -1) { - http_buf = erealloc(http_buf, http_buf_size + buf_size + 1); - len_size = 0; - - while (http_buf_size buf_size) { - len_size += php_stream_read(stream, http_buf + http_buf_size, buf_size - len_size); - http_buf_size += len_size; - } + int buf_size = 0; + php_stream_gets(stream, chunk_size, sizeof(chunk_size)); + if (sscanf(chunk_size, %x, buf_size) 0 ) { + if (buf_size 0) { + int len_size = 0; + + http_buf = erealloc(http_buf, http_buf_size + buf_size + 1); + + while (len_size buf_size) { + int len_read = php_stream_read(stream, http_buf + http_buf_size, buf_size - len_size); + if (len_read = 0) { + /* Error or EOF */ + done = TRUE; + break; + } + len_size += len_read; + http_buf_size += len_size; + } + } + /* Eat up '\r' '\n' */ - php_stream_getc(stream);php_stream_getc(stream); + php_stream_getc(stream); + php_stream_getc(stream); + } else { + /* Somthing wrong in chunked encoding */ + efree(trans_enc); + efree(http_buf); + return FALSE; } if (buf_size == 0) { done = TRUE; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/soap soap.c
dmitry Wed Feb 18 02:35:35 2004 EDT Modified files: /php-src/ext/soap soap.c Log: fix: SoapFault constructor fixed to confirm documentation. http://cvs.php.net/diff.php/php-src/ext/soap/soap.c?r1=1.87r2=1.88ty=u Index: php-src/ext/soap/soap.c diff -u php-src/ext/soap/soap.c:1.87 php-src/ext/soap/soap.c:1.88 --- php-src/ext/soap/soap.c:1.87Tue Feb 17 10:10:16 2004 +++ php-src/ext/soap/soap.c Wed Feb 18 02:35:34 2004 @@ -17,7 +17,7 @@ | Dmitry Stogov [EMAIL PROTECTED] | +--+ */ -/* $Id: soap.c,v 1.87 2004/02/17 15:10:16 dmitry Exp $ */ +/* $Id: soap.c,v 1.88 2004/02/18 07:35:34 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -670,10 +670,11 @@ int fault_string_len, fault_code_len, fault_actor_len; zval *details = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|zs, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ss|s!z!, fault_code, fault_code_len, fault_string, fault_string_len, - details, fault_actor, fault_actor_len) == FAILURE) { + fault_actor, fault_actor_len, + details) == FAILURE) { php_error(E_ERROR, Invalid arguments to SoapFault constructor); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php