You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2008/05/15 19:20:09 UTC
svn commit: r656746 - in
/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src:
attachments/mime_parser.c om/om_node.c
Author: manjula
Date: Thu May 15 10:20:08 2008
New Revision: 656746
URL: http://svn.apache.org/viewvc?rev=656746&view=rev
Log:
adding latest changes.
Modified:
webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c
webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/om/om_node.c
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c?rev=656746&r1=656745&r2=656746&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/mime_parser.c Thu May 15 10:20:08 2008
@@ -326,11 +326,12 @@
malloc_len = len_array[buf_num] - search_info->match_len1 - temp_mime_boundary_size;
buffer = AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (
size + 1));
+ memset(buffer, 0, size + 1);
memcpy(buffer, pos + temp_mime_boundary_size, malloc_len);
axiom_mime_parser_clear_buffers(env, buf_array, part_start, buf_num);
buf_array[buf_num] = buffer;
len_array[buf_num] = malloc_len;
-
+ printf("Malloc_len after soap : %d \n", malloc_len);
}
else
{
@@ -377,10 +378,14 @@
malloc_len = 0;
part_start = buf_num;
-
+
+ printf("before crlf method %d\n", len_array[buf_num]);
+
pos = axiom_mime_parser_search_for_crlf(env, callback, callback_ctx, &buf_num,
len_array, buf_array, search_info, size);
+ printf("after crlf method %d\n", len_array[buf_num]);
+
if(!pos)
{
return NULL;
@@ -393,12 +398,14 @@
env, buf_num, len_array, part_start, pos, buf_array[buf_num]);
if(mime_headers_len > 0)
{
+ printf("before calculate len method %d\n", len_array[buf_num]);
mime_headers = axiom_mime_parser_create_part(
env, mime_headers_len, buf_num, len_array, part_start, pos, buf_array);
if(!mime_headers)
{
return NULL;
}
+ printf("after calculate len method %d\n", len_array[buf_num]);
malloc_len = buf_array[buf_num] + len_array[buf_num] - pos - 4;
buffer = AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * (
size + 1));
Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/om/om_node.c?rev=656746&r1=656745&r2=656746&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/om/om_node.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/om/om_node.c Thu May 15 10:20:08 2008
@@ -365,6 +365,13 @@
AXIS2_PARAM_CHECK(env->error, node_to_insert, AXIS2_FAILURE);
+ if (!om_node->parent)
+ {
+ /* We shouldn't add a sibling becuase this node doesn't has a parent.
+ * This can be the root node of the tree*/
+ return AXIS2_FAILURE;
+ }
+
node_to_insert->parent = om_node->parent;
node_to_insert->prev_sibling = om_node;
@@ -393,6 +400,13 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, node_to_insert, AXIS2_FAILURE);
+ if (!om_node->parent)
+ {
+ /* We shouldn't add a sibling becuase this node doesn't has a parent.
+ * This can be the root node of the tree*/
+ return AXIS2_FAILURE;
+ }
+
node_to_insert->parent = om_node->parent;
node_to_insert->prev_sibling = om_node->prev_sibling;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org