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 sa...@apache.org on 2006/05/14 11:29:13 UTC
svn commit: r406290 - in /webservices/axis2/trunk/c/modules:
core/transport/http/http_transport_utils.c xml/attachments/data_handler.c
Author: samisa
Date: Sun May 14 02:29:12 2006
New Revision: 406290
URL: http://svn.apache.org/viewcvs?rev=406290&view=rev
Log:
Applied patches by Kapila to improve performance of MTOM
Modified:
webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
webservices/axis2/trunk/c/modules/xml/attachments/data_handler.c
Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?rev=406290&r1=406289&r2=406290&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Sun May 14 02:29:12 2006
@@ -199,7 +199,7 @@
if (mime_boundary)
{
axis2_char_t *buffer = NULL;
- int size = 1024;
+ int size = 1024 * 1024;
int len = 0;
axis2_char_t *root_mime = NULL;
int root_mime_len = 0;
Modified: webservices/axis2/trunk/c/modules/xml/attachments/data_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/attachments/data_handler.c?rev=406290&r1=406289&r2=406290&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/attachments/data_handler.c (original)
+++ webservices/axis2/trunk/c/modules/xml/attachments/data_handler.c Sun May 14 02:29:12 2006
@@ -16,6 +16,7 @@
#include <axis2_data_handler.h>
#include <stdio.h>
+#include <sys/stat.h>
typedef struct axis2_data_handler_impl
{
@@ -185,7 +186,12 @@
return AXIS2_FAILURE;
do {
- read_stream_size = 1024;
+ struct stat stat_p;
+ if ( -1 == stat (data_handler_impl->file_name, &stat_p))
+ {
+ return AXIS2_FAILURE;
+ }
+ read_stream_size = stat_p.st_size;
read_stream = AXIS2_MALLOC((*env)->allocator, (read_stream_size) * sizeof(axis2_byte_t));
if (!read_stream)
{
@@ -197,7 +203,7 @@
}
return AXIS2_FAILURE;
}
- count = fread(read_stream, 1, 1024, f);
+ count = fread(read_stream, 1, read_stream_size, f);
if (ferror(f) != 0)
{
/*TODO : need to set the correct error code */