You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ma...@apache.org on 2008/07/20 11:11:27 UTC

svn commit: r678262 - in /webservices/axis2/branches/c/post_1_4_mtom/c: axiom/include/axiom_mime_parser.h axiom/src/attachments/data_handler.c src/core/transport/http/server/apache2/apache2_worker.c

Author: manjula
Date: Sun Jul 20 02:11:26 2008
New Revision: 678262

URL: http://svn.apache.org/viewvc?rev=678262&view=rev
Log:
Fixing some bugs in inmemory attachment caching.

Modified:
    webservices/axis2/branches/c/post_1_4_mtom/c/axiom/include/axiom_mime_parser.h
    webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/data_handler.c
    webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/apache2/apache2_worker.c

Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/include/axiom_mime_parser.h
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/include/axiom_mime_parser.h?rev=678262&r1=678261&r2=678262&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/include/axiom_mime_parser.h (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/include/axiom_mime_parser.h Sun Jul 20 02:11:26 2008
@@ -38,7 +38,7 @@
 {
 #endif
 
-#define AXIOM_MIME_PARSER_BUFFER_SIZE (1024/2)
+#define AXIOM_MIME_PARSER_BUFFER_SIZE (1024 * 1024/2)
 #define AXIOM_MIME_PARSER_MAX_BUFFERS 1000
 
 #define AXIOM_MIME_PARSER_END_OF_MIME_MAX_COUNT 100

Modified: webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/data_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/data_handler.c?rev=678262&r1=678261&r2=678262&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/data_handler.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/axiom/src/attachments/data_handler.c Sun Jul 20 02:11:26 2008
@@ -459,7 +459,11 @@
     
     if (data_handler->data_handler_type == AXIOM_DATA_HANDLER_TYPE_BUFFER)
     {
-        binary_part->part = (axis2_byte_t *)axutil_strdup(env, data_handler->buffer);
+        /*binary_part->part = (axis2_byte_t *)axutil_strdup(env, data_handler->buffer);*/
+        binary_part->part = (axis2_byte_t *)AXIS2_MALLOC(env->allocator, 
+            (data_handler->buffer_len) * sizeof(axis2_byte_t));
+        memcpy(binary_part->part, data_handler->buffer, data_handler->buffer_len);
+
         binary_part->part_size = data_handler->buffer_len;
         binary_part->type = AXIOM_MIME_PART_BUFFER;
     }

Modified: webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/apache2/apache2_worker.c?rev=678262&r1=678261&r2=678262&view=diff
==============================================================================
--- webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/apache2/apache2_worker.c (original)
+++ webservices/axis2/branches/c/post_1_4_mtom/c/src/core/transport/http/server/apache2/apache2_worker.c Sun Jul 20 02:11:26 2008
@@ -1329,7 +1329,7 @@
             {
                 len = 0;
                 len = ap_rwrite(mime_part->part, mime_part->part_size, request);
-                ap_rflush(request);
+                /*ap_rflush(request);*/
                 if(len == -1)
                 {
                     status = AXIS2_FAILURE;