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/02/09 11:59:38 UTC

svn commit: r376258 - /webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c

Author: sahan
Date: Thu Feb  9 02:59:37 2006
New Revision: 376258

URL: http://svn.apache.org/viewcvs?rev=376258&view=rev
Log:
Changes to support Windows

Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.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=376258&r1=376257&r2=376258&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 Thu Feb  9 02:59:37 2006
@@ -780,14 +780,24 @@
 	else
 	{
 		axis2_stream_t *in_stream = NULL;
-		in_stream = (axis2_stream_t *)((axis2_callback_info_t*)ctx)->in_stream;
-		len = AXIS2_STREAM_READ(in_stream, env, buffer, size);
-		if(len > 0)
-		{
-			((axis2_callback_info_t*)ctx)->unread_len -= len;
-		}
-		return len;
-	}
+        int read_len = 0;
+        in_stream = (axis2_stream_t *)((axis2_callback_info_t*)ctx)->in_stream;
+        if(size > ((axis2_callback_info_t*)ctx)->unread_len)
+        {
+            read_len = ((axis2_callback_info_t*)ctx)->unread_len;
+        }
+        else
+        {
+            read_len = size;
+        }
+        len = AXIS2_STREAM_READ(in_stream, env, buffer, read_len);
+        if(len > 0)
+        {
+            ((axis2_callback_info_t*)ctx)->unread_len -= len;
+        }
+        return len;
+    }
+
 	return 0;	
 }