axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r369690 - in /webservices/axis2/trunk/c/modules/util: network_handler.c stream.c
Date Tue, 17 Jan 2006 05:44:06 GMT
Author: samisa
Date: Mon Jan 16 21:44:01 2006
New Revision: 369690

URL: http://svn.apache.org/viewcvs?rev=369690&view=rev
Log:
Fixed a read bug in stream. Improved server socket creation

Modified:
    webservices/axis2/trunk/c/modules/util/network_handler.c
    webservices/axis2/trunk/c/modules/util/stream.c

Modified: webservices/axis2/trunk/c/modules/util/network_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/network_handler.c?rev=369690&r1=369689&r2=369690&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/network_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/network_handler.c Mon Jan 16 21:44:01 2006
@@ -88,9 +88,9 @@
 	}
 	/** Address re-use */
 	i = 1;
-	/*setsockopt(sock, SOL_SOCKET, SO_REUSEADDR ,&i, sizeof(int));*/
+	setsockopt(sock, SOL_SOCKET, SO_REUSEADDR ,&i, sizeof(int));
 	/** Exec behaviour */
-	/*fcntl(sock, F_SETFD, FD_CLOEXEC);*/
+	fcntl(sock, F_SETFD, FD_CLOEXEC);
 	
 	
     memset(&sock_addr,0,sizeof(sock_addr));

Modified: webservices/axis2/trunk/c/modules/util/stream.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/stream.c?rev=369690&r1=369689&r2=369690&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/stream.c (original)
+++ webservices/axis2/trunk/c/modules/util/stream.c Mon Jan 16 21:44:01 2006
@@ -239,7 +239,6 @@
 axis2_stream_read_basic (axis2_stream_t *stream, axis2_env_t **env, 
 						void *buffer, size_t count)
 {
-    int i = 0;
 	int len = 0;
 	char *buf = NULL;
 	
@@ -267,8 +266,8 @@
 	 * Finally we need to remove the read bytes from the stream
 	 * adjust the length of the stream.
 	 */
-	AXIS2_INTF_TO_IMPL(stream)->len -= i;
-	memmove(buf, buf + i * sizeof(axis2_char_t), 
+	AXIS2_INTF_TO_IMPL(stream)->len -= len;
+	memmove(buf, buf + len * sizeof(axis2_char_t), 
 						AXIS2_INTF_TO_IMPL(stream)->len * sizeof(axis2_char_t));
 	((axis2_char_t *) buffer)[len] = '\0';
     return len;



Mime
View raw message