aboutsummaryrefslogtreecommitdiff
path: root/net/php5-soap
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-02-09 12:32:03 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-02-09 12:32:03 +0000
commit4d7e6a521a92032de4ed795dc82d4d484dbc8d81 (patch)
tree3ad1aaf88a8f6894f4c1d7640094f2b95c3f714f /net/php5-soap
parentba7bd679d1ac0fbdfa7eebfd449c0055dfc2292f (diff)
downloadports-4d7e6a521a92032de4ed795dc82d4d484dbc8d81.tar.gz
ports-4d7e6a521a92032de4ed795dc82d4d484dbc8d81.zip
Notes
Diffstat (limited to 'net/php5-soap')
-rw-r--r--net/php5-soap/files/patch-cvs_5_2271
1 files changed, 0 insertions, 271 deletions
diff --git a/net/php5-soap/files/patch-cvs_5_2 b/net/php5-soap/files/patch-cvs_5_2
deleted file mode 100644
index d2e8b78f4cbb..000000000000
--- a/net/php5-soap/files/patch-cvs_5_2
+++ /dev/null
@@ -1,271 +0,0 @@
-# Obtained from PHP_5_2 CVS in 20061214
-#
-# php_encoding.c:
-#
-# Fixed decoding list of arrays (related to bug #39121)
-# Fixed bug #38536 (SOAP returns an array of values instead of an object)
-# Fixed bug #39454 (Returning a SOAP array segfaults PHP)
-#
-# php_http.c:
-#
-# Replace non-threadsafe rand() with php_rand_r()
-#
-# php_packet_soap.c:
-#
-# Fixed bug #39121 (Incorrect return array handling in non-wsdl soap client)
-#
-# php_sdl.c:
-#
-# Small hash table optimization
-#
-Index: php_encoding.c
-===================================================================
-RCS file: /repository/php-src/ext/soap/php_encoding.c,v
-retrieving revision 1.103.2.21.2.13
-retrieving revision 1.103.2.21.2.16
-diff -u -r1.103.2.21.2.13 -r1.103.2.21.2.16
---- php_encoding.c 24 Oct 2006 05:20:50 -0000 1.103.2.21.2.13
-+++ php_encoding.c 10 Nov 2006 15:05:22 -0000 1.103.2.21.2.16
-@@ -1102,23 +1102,23 @@
- }
- add_string_to_string(val, val, val2);
- zval_ptr_dtor(&val2);
-- node = node->next;
-+ node = node->next;
- }
- }
- if (any == NULL) {
- any = val;
- } else {
- if (Z_TYPE_P(any) != IS_ARRAY) {
-- /* Convert into array */
-- zval *arr;
-+ /* Convert into array */
-+ zval *arr;
-
-- MAKE_STD_ZVAL(arr);
-- array_init(arr);
-- add_next_index_zval(arr, any);
-- any = arr;
-- }
-- /* Add array element */
-- add_next_index_zval(any, val);
-+ MAKE_STD_ZVAL(arr);
-+ array_init(arr);
-+ add_next_index_zval(arr, any);
-+ any = arr;
-+ }
-+ /* Add array element */
-+ add_next_index_zval(any, val);
- }
- }
- node = node->next;
-@@ -1137,13 +1137,14 @@
-
- if (node) {
- zval *val;
-+ xmlNodePtr r_node;
-
-- node = check_and_resolve_href(node);
-- if (node && node->children && node->children->content) {
-- if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != 0) {
-- soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, node->children->content);
-+ r_node = check_and_resolve_href(node);
-+ if (r_node && r_node->children && r_node->children->content) {
-+ if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)r_node->children->content) != 0) {
-+ soap_error3(E_ERROR, "Encoding: Element '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.element->fixed, r_node->children->content);
- }
-- val = master_to_zval(model->u.element->encode, node);
-+ val = master_to_zval(model->u.element->encode, r_node);
- } else if (model->u.element->fixed) {
- xmlNodePtr dummy = xmlNewNode(NULL, BAD_CAST("BOGUS"));
- xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed));
-@@ -1155,7 +1156,7 @@
- val = master_to_zval(model->u.element->encode, dummy);
- xmlFreeNode(dummy);
- } else {
-- val = master_to_zval(model->u.element->encode, node);
-+ val = master_to_zval(model->u.element->encode, r_node);
- }
- if ((node = get_node(node->next, model->u.element->name)) != NULL) {
- zval *array;
-@@ -1378,22 +1379,31 @@
-
- prop = get_zval_property(ret, (char*)trav->name TSRMLS_CC);
- if (!prop) {
-- set_zval_property(ret, (char*)trav->name, tmpVal TSRMLS_CC);
-+ if (!trav->next || !get_node(trav->next, (char*)trav->name)) {
-+ set_zval_property(ret, (char*)trav->name, tmpVal TSRMLS_CC);
-+ } else {
-+ zval *arr;
-+
-+ MAKE_STD_ZVAL(arr);
-+ array_init(arr);
-+ add_next_index_zval(arr, tmpVal);
-+ set_zval_property(ret, (char*)trav->name, arr TSRMLS_CC);
-+ }
- } else {
-- /* Property already exist - make array */
-- if (Z_TYPE_P(prop) != IS_ARRAY) {
-- /* Convert into array */
-- zval *arr;
--
-- MAKE_STD_ZVAL(arr);
-- array_init(arr);
-- prop->refcount++;
-- add_next_index_zval(arr, prop);
-- set_zval_property(ret, (char*)trav->name, arr TSRMLS_CC);
-- prop = arr;
-- }
-- /* Add array element */
-- add_next_index_zval(prop, tmpVal);
-+ /* Property already exist - make array */
-+ if (Z_TYPE_P(prop) != IS_ARRAY) {
-+ /* Convert into array */
-+ zval *arr;
-+
-+ MAKE_STD_ZVAL(arr);
-+ array_init(arr);
-+ prop->refcount++;
-+ add_next_index_zval(arr, prop);
-+ set_zval_property(ret, (char*)trav->name, arr TSRMLS_CC);
-+ prop = arr;
-+ }
-+ /* Add array element */
-+ add_next_index_zval(prop, tmpVal);
- }
- }
- trav = trav->next;
-@@ -2013,6 +2023,7 @@
- zend_hash_find(sdl_type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType",
- sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) {
-
- char *value, *end;
-@@ -2061,6 +2072,7 @@
- zend_hash_find(sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType",
- sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":itemType"), (void **)&ext) == SUCCESS) {
- if ((*ext)->ns != NULL) {
- enc = get_encoder(SOAP_GLOBAL(sdl), (*ext)->ns, (*ext)->val);
-@@ -2071,6 +2083,7 @@
- if (zend_hash_find(sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
- sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) == SUCCESS) {
- dimension = calc_dimension_12((*ext)->val);
- dims = get_position_12(dimension, (*ext)->val);
-@@ -2091,6 +2104,7 @@
- zend_hash_find(sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
- sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraySize"), (void **)&ext) == SUCCESS) {
- dimension = calc_dimension_12((*ext)->val);
- dims = get_position_12(dimension, (*ext)->val);
-@@ -2248,6 +2262,7 @@
- zend_hash_find(type->sdl_type->attributes, SOAP_1_1_ENC_NAMESPACE":arrayType",
- sizeof(SOAP_1_1_ENC_NAMESPACE":arrayType"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arrayType", sizeof(WSDL_NAMESPACE":arrayType"), (void **)&ext) == SUCCESS) {
- char *type, *end;
-
-@@ -2269,6 +2284,7 @@
- zend_hash_find(type->sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":itemType",
- sizeof(SOAP_1_2_ENC_NAMESPACE":itemType"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":itemType", sizeof(WSDL_NAMESPACE":itemType"), (void **)&ext) == SUCCESS) {
-
- if ((*ext)->ns != NULL) {
-@@ -2278,6 +2294,7 @@
- if (zend_hash_find(type->sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
- sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) == SUCCESS) {
- dimension = calc_dimension_12((*ext)->val);
- dims = get_position_12(dimension, (*ext)->val);
-@@ -2290,6 +2307,7 @@
- zend_hash_find(type->sdl_type->attributes, SOAP_1_2_ENC_NAMESPACE":arraySize",
- sizeof(SOAP_1_2_ENC_NAMESPACE":arraySize"),
- (void **)&arrayType) == SUCCESS &&
-+ (*arrayType)->extraAttributes &&
- zend_hash_find((*arrayType)->extraAttributes, WSDL_NAMESPACE":arraySize", sizeof(WSDL_NAMESPACE":arraysize"), (void **)&ext) == SUCCESS) {
-
- dimension = calc_dimension_12((*ext)->val);
-Index: php_http.c
-===================================================================
-RCS file: /repository/php-src/ext/soap/php_http.c,v
-retrieving revision 1.77.2.11.2.3
-retrieving revision 1.77.2.11.2.4
-diff -u -r1.77.2.11.2.3 -r1.77.2.11.2.4
---- php_http.c 6 Sep 2006 11:03:45 -0000 1.77.2.11.2.3
-+++ php_http.c 28 Nov 2006 00:22:05 -0000 1.77.2.11.2.4
-@@ -469,9 +469,10 @@
- char HA1[33], HA2[33], response[33], cnonce[33], nc[9];
- PHP_MD5_CTX md5ctx;
- unsigned char hash[16];
-+ unsigned int ctx;
-
- PHP_MD5Init(&md5ctx);
-- sprintf(cnonce, "%d", rand());
-+ sprintf(cnonce, "%d", php_rand_r(&ctx));
- PHP_MD5Update(&md5ctx, (unsigned char*)cnonce, strlen(cnonce));
- PHP_MD5Final(hash, &md5ctx);
- make_digest(cnonce, hash);
-Index: php_packet_soap.c
-===================================================================
-RCS file: /repository/php-src/ext/soap/php_packet_soap.c,v
-retrieving revision 1.42.2.1.2.2
-retrieving revision 1.42.2.1.2.3
-diff -u -r1.42.2.1.2.2 -r1.42.2.1.2.3
---- php_packet_soap.c 11 Jul 2006 14:24:18 -0000 1.42.2.1.2.2
-+++ php_packet_soap.c 6 Nov 2006 16:36:43 -0000 1.42.2.1.2.3
-@@ -350,10 +350,22 @@
- if (val != NULL) {
- if (!node_is_equal_ex(val,"result",RPC_SOAP12_NAMESPACE)) {
- zval *tmp;
-+ zval **arr;
-
- tmp = master_to_zval(NULL, val);
- if (val->name) {
-- add_assoc_zval(return_value, (char*)val->name, tmp);
-+ if (zend_hash_find(Z_ARRVAL_P(return_value), (char*)val->name, strlen((char*)val->name)+1, (void**)&arr) == SUCCESS) {
-+ add_next_index_zval(*arr, tmp);
-+ } else if (val->next && get_node(val->next, (char*)val->name)) {
-+ zval *arr;
-+
-+ MAKE_STD_ZVAL(arr);
-+ array_init(arr);
-+ add_next_index_zval(arr, tmp);
-+ add_assoc_zval(return_value, (char*)val->name, arr);
-+ } else {
-+ add_assoc_zval(return_value, (char*)val->name, tmp);
-+ }
- } else {
- add_next_index_zval(return_value, tmp);
- }
-Index: php_sdl.c
-===================================================================
-RCS file: /repository/php-src/ext/soap/php_sdl.c,v
-retrieving revision 1.88.2.12.2.3
-retrieving revision 1.88.2.12.2.4
-diff -u -r1.88.2.12.2.3 -r1.88.2.12.2.4
---- php_sdl.c 20 Sep 2006 13:42:50 -0000 1.88.2.12.2.3
-+++ php_sdl.c 30 Nov 2006 23:51:24 -0000 1.88.2.12.2.4
-@@ -1863,7 +1863,7 @@
- sdlTypePtr *tmp;
-
- tmp_elements = emalloc(sizeof(HashTable));
-- zend_hash_init(tmp_elements, 0, NULL, NULL, 0);
-+ zend_hash_init(tmp_elements, zend_hash_num_elements(type->elements), NULL, NULL, 0);
-
- zend_hash_internal_pointer_reset(type->elements);
- while (zend_hash_get_current_data(type->elements, (void**)&tmp) == SUCCESS) {