ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From su...@apache.org
Subject svn commit: r683118 - in /webservices/axis2/trunk/c/util: include/axutil_allocator.h src/network_handler.c
Date Wed, 06 Aug 2008 05:53:55 GMT
Author: supun
Date: Tue Aug  5 22:53:54 2008
New Revision: 683118

URL: http://svn.apache.org/viewvc?rev=683118&view=rev
Log:
fixing some typos

Modified:
    webservices/axis2/trunk/c/util/include/axutil_allocator.h
    webservices/axis2/trunk/c/util/src/network_handler.c

Modified: webservices/axis2/trunk/c/util/include/axutil_allocator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axutil_allocator.h?rev=683118&r1=683117&r2=683118&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axutil_allocator.h (original)
+++ webservices/axis2/trunk/c/util/include/axutil_allocator.h Tue Aug  5 22:53:54 2008
@@ -24,7 +24,7 @@
  */
 
 #include <axutil_utils_defines.h>
-
+#include <stdlib.h>
 #ifdef __cplusplus
 extern "C"
 {
@@ -160,13 +160,15 @@
         axutil_allocator_t * allocator);
 
 #define AXIS2_MALLOC(allocator, size) \
-      ((allocator)->malloc_fn(allocator, size))
+    malloc(size)
+     /* ((allocator)->malloc_fn(allocator, size))*/
 
 #define AXIS2_REALLOC(allocator, ptr, size) \
       ((allocator)->realloc(allocator, ptr, size))
 
 #define AXIS2_FREE(allocator, ptr) \
-      ((allocator)->free_fn(allocator, ptr))
+    free(ptr)
+     /* ((allocator)->free_fn(allocator, ptr))*/
 
     /** @} */
 

Modified: webservices/axis2/trunk/c/util/src/network_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/network_handler.c?rev=683118&r1=683117&r2=683118&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/network_handler.c (original)
+++ webservices/axis2/trunk/c/util/src/network_handler.c Tue Aug  5 22:53:54 2008
@@ -440,8 +440,7 @@
 {
 	struct sockaddr_in sender_address;
 	int received = 0; 
-	axis2_char_t buf[AXUTIL_WIN32_ERROR_BUFSIZE];
-	int sender_address_size = sizeof(sender_address);
+	unsigned int sender_address_size = sizeof(sender_address);
 
 	received = recvfrom(sock,  
 						buffer, 
@@ -453,6 +452,7 @@
 #ifdef WIN32
 	if (SOCKET_ERROR == received)
 	{
+	    axis2_char_t buf[AXUTIL_WIN32_ERROR_BUFSIZE];
 		axutil_win32_get_last_wsa_error(buf, AXUTIL_WIN32_ERROR_BUFSIZE);
 		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
 		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, buf); 
@@ -483,9 +483,9 @@
 								 axis2_char_t *addr, int dest_port, int *source_port)
 {
     struct sockaddr_in recv_addr, source_addr;
-	int send_bytes = 0;	
-	int recv_addr_size;
-	int source_addr_size = sizeof(source_addr);
+	int send_bytes = 0;		
+    unsigned int recv_addr_size = 0;
+	unsigned int source_addr_size = sizeof(source_addr);
 	recv_addr_size = sizeof(recv_addr);	
 
 	memset(&recv_addr, 0, sizeof(recv_addr));
@@ -523,7 +523,7 @@
 					(struct sockaddr *) &recv_addr, 
 					recv_addr_size);	
 
-	getsockname(sock, (SOCKADDR *)&source_addr, &source_addr_size);
+	getsockname(sock, (struct sockaddr *)&source_addr, &source_addr_size);
 
 #ifdef WIN32
 	if (send_bytes == SOCKET_ERROR)
@@ -585,7 +585,6 @@
 	axis2_socket_t sock = AXIS2_INVALID_SOCKET;
     struct sockaddr_in sock_addr;
 	struct ip_mreq mc_req;
-	axis2_char_t buf[AXUTIL_WIN32_ERROR_BUFSIZE];
 
     AXIS2_ENV_CHECK(env, AXIS2_CRITICAL_FAILURE);
 #if defined(WIN32)
@@ -606,6 +605,7 @@
 #else
 	if (sock == INVALID_SOCKET)
 	{		
+	    axis2_char_t buf[AXUTIL_WIN32_ERROR_BUFSIZE];
 		axutil_win32_get_last_wsa_error(buf, AXUTIL_WIN32_ERROR_BUFSIZE);
 		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
 		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, buf); 
@@ -633,6 +633,7 @@
 	mc_req.imr_interface.s_addr = htonl(INADDR_ANY) ;
 #ifdef WIN32	
 	if ((setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &mc_req, sizeof(mc_req)))
== SOCKET_ERROR) {
+	    axis2_char_t buf[AXUTIL_WIN32_ERROR_BUFSIZE];
 		axutil_win32_get_last_wsa_error(buf, AXUTIL_WIN32_ERROR_BUFSIZE);
 		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
 		AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, buf); 
@@ -640,7 +641,7 @@
 	}
 #else
 	if ((setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *) &mc_req, sizeof(mc_req)))
< 0) {
-	    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);s
+	    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);
         return AXIS2_FAILURE;
 	}
 #endif	



Mime
View raw message