axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r369431 - in /webservices/axis2/trunk/c/modules/util: network_handler.c stream.c
Date Mon, 16 Jan 2006 10:36:33 GMT
Author: samisa
Date: Mon Jan 16 02:36:29 2006
New Revision: 369431

URL: http://svn.apache.org/viewcvs?rev=369431&view=rev
Log:
Fixed some bugs ... added listen

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=369431&r1=369430&r2=369431&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/network_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/network_handler.c Mon Jan 16 02:36:29 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));
@@ -106,6 +106,12 @@
 						AXIS2_FAILURE);
 		return -1;
 	}
+    if(listen(sock, 50) < 0)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_SOCKET_LISTEN_FAILED,
+                        AXIS2_FAILURE);
+        return -1;
+    }
 	return sock;
 }
 
@@ -146,13 +152,14 @@
 axis2_network_handler_svr_socket_accept(axis2_env_t **env, int svr_socket)
 {
 	int cli_socket = -1;
-	struct sockaddr_in cli_addr;
+	struct sockaddr cli_addr;
 	socklen_t cli_len = 0;
 	
 	AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
 	
 	cli_len = sizeof(cli_addr);
 	cli_socket = accept(svr_socket, (struct sockaddr *)&cli_addr, &cli_len);
+    perror("My Message");
 	return cli_socket;
 }
 

Modified: webservices/axis2/trunk/c/modules/util/stream.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/stream.c?rev=369431&r1=369430&r2=369431&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/stream.c (original)
+++ webservices/axis2/trunk/c/modules/util/stream.c Mon Jan 16 02:36:29 2006
@@ -45,6 +45,9 @@
 axis2_status_t AXIS2_CALL 
 axis2_stream_free (axis2_stream_t *stream, axis2_env_t **env);
 
+axis2_stream_type_t AXIS2_CALL 
+axis2_stream_get_type (axis2_stream_t *stream, axis2_env_t **env);
+
 /** basic stream operatons **/
 int AXIS2_CALL
 axis2_stream_write_basic(axis2_stream_t *stream, axis2_env_t **env, 
@@ -184,6 +187,13 @@
    	AXIS2_FREE((*env)->allocator, stream_impl);
 	
     return AXIS2_SUCCESS;
+}
+
+axis2_stream_type_t AXIS2_CALL 
+axis2_stream_get_type (axis2_stream_t *stream, axis2_env_t **env)
+{
+	AXIS2_FUNC_PARAM_CHECK(stream, env, AXIS2_CRTICAL_FAILURE);
+	return AXIS2_INTF_TO_IMPL(stream)->stream_type;
 }
 
 /************************ Basic Stream Operations *****************************/



Mime
View raw message