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 2007/04/04 05:24:29 UTC

svn commit: r525384 - in /webservices/axis2/trunk/c/tools/tcpmon: include/tcpmon_entry.h include/tcpmon_session.h src/entry.c src/tcpmon.c src/util.c

Author: samisa
Date: Tue Apr  3 20:24:28 2007
New Revision: 525384

URL: http://svn.apache.org/viewvc?view=rev&rev=525384
Log:
Fixed build break

Modified:
    webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h
    webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_session.h
    webservices/axis2/trunk/c/tools/tcpmon/src/entry.c
    webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c
    webservices/axis2/trunk/c/tools/tcpmon/src/util.c

Modified: webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h?view=diff&rev=525384&r1=525383&r2=525384
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h Tue Apr  3 20:24:28 2007
@@ -126,7 +126,7 @@
 
     int (AXIS2_CALL *
     get_format_bit) (tcpmon_entry_t *entry,
-	                    axutil_env_t *env);
+	                    const axutil_env_t *env);
 
     axis2_status_t (AXIS2_CALL *
     set_format_bit) (tcpmon_entry_t *entry,

Modified: webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_session.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_session.h?view=diff&rev=525384&r1=525383&r2=525384
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_session.h (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_session.h Tue Apr  3 20:24:28 2007
@@ -74,7 +74,7 @@
 
 	 axis2_status_t (AXIS2_CALL *
 						  get_test_bit) (tcpmon_session_t *session,
-											  axutil_env_t *env);
+											  const axutil_env_t *env);
     axis2_status_t (AXIS2_CALL *
                           set_format_bit) (tcpmon_session_t *session,
                                               const axutil_env_t *env,

Modified: webservices/axis2/trunk/c/tools/tcpmon/src/entry.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/src/entry.c?view=diff&rev=525384&r1=525383&r2=525384
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/entry.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/entry.c Tue Apr  3 20:24:28 2007
@@ -473,8 +473,8 @@
 	 host_socket = axutil_network_handler_open_socket(env, target_host, target_port);
 	 if (-1 == host_socket)
 		{
-			 axis2_stream_write(client_stream, env, NULL, 0);
-			 axis2_stream_free(client_stream, env);
+			 axutil_stream_write(client_stream, env, NULL, 0);
+			 axutil_stream_free(client_stream, env);
 			 axutil_network_handler_close_socket(env, client_socket);
 			 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error in creating host_socket"
 								  "creating socket");
@@ -490,8 +490,8 @@
 	 host_stream = axutil_stream_create_socket(env, host_socket);
 	 if (! host_stream)
 		{
-			 axis2_stream_write(client_stream, env, NULL, 0);
-			 axis2_stream_free(client_stream, env);
+			 axutil_stream_write(client_stream, env, NULL, 0);
+			 axutil_stream_free(client_stream, env);
 			 axutil_network_handler_close_socket(env, client_socket);
 			 axutil_network_handler_close_socket(env, host_socket);
 			 AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error in creating host stream"
@@ -505,7 +505,7 @@
 			 return NULL;
 		}
 
-	 axis2_stream_write(host_stream, env, buffer , buffer_size);
+	 axutil_stream_write(host_stream, env, buffer , buffer_size);
 	 AXIS2_FREE(env-> allocator, buffer);
 
 	 buffer = read_current_stream(host_stream, env, &buffer_size,
@@ -552,11 +552,11 @@
 		}
 
 
-	 axis2_stream_write(client_stream, env, buffer, buffer_size);
+	 axutil_stream_write(client_stream, env, buffer, buffer_size);
 	 AXIS2_FREE(env-> allocator, buffer);
 
-	 axis2_stream_free(client_stream, env);
-	 axis2_stream_free(host_stream, env);
+	 axutil_stream_free(client_stream, env);
+	 axutil_stream_free(host_stream, env);
 	 axutil_network_handler_close_socket(env, client_socket);
 	 axutil_network_handler_close_socket(env, host_socket);
 
@@ -592,7 +592,7 @@
 		{
 			 buffer = AXIS2_REALLOC(env-> allocator, buffer,
 											sizeof(axis2_char_t) * (read_size + 1));
-			 read = axis2_stream_read(stream, env , buffer + read_size,  1);
+			 read = axutil_stream_read(stream, env , buffer + read_size,  1);
 
 			 if (header_just_finished)
 				{

Modified: webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c?view=diff&rev=525384&r1=525383&r2=525384
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c Tue Apr  3 20:24:28 2007
@@ -42,7 +42,7 @@
 		axutil_thread_pool_t *thread_pool = NULL;
 		tcpmon_session_t* session = NULL;
 		int c;
-		int listen_port = 0, target_port = 0;
+		int listen_port = 9090, target_port = 8080;
 		char *target_host = NULL;
 		int test_bit = 0;
         int format_bit = 0;
@@ -56,8 +56,9 @@
 
 		env = axutil_env_create_with_error_log_thread_pool(allocator, error, log,
 																		  thread_pool);
-
-		if (argc < 2 || !axutil_strcmp(argv[1], "-h"))
+        target_host = axutil_strdup(env, "localhost");
+        
+		if (!axutil_strcmp(argv[1], "-h"))
 		{
 				printf("Usage : %s [OPTIONS] -lp LISTEN_PORT -tp TARGET_PORT -th [TARGET_HOST]\n", argv[0]);
 				printf("use -h for help\n");

Modified: webservices/axis2/trunk/c/tools/tcpmon/src/util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/src/util.c?view=diff&rev=525384&r1=525383&r2=525384
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/util.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/util.c Tue Apr  3 20:24:28 2007
@@ -38,14 +38,16 @@
 
 axis2_char_t* tcpmon_strcat(char *dest, char *source, int *cur_buf_s, const axutil_env_t *env);
 
-static void add_string(const axutil_env_t* env,
+/*static void add_string(const axutil_env_t* env,
 		       tcpmon_util_allocator_t* allocator,
 		       axis2_char_t* string);
+*/
 
-static void add_axis2_char_t(const axutil_env_t* env,
+/*static void add_axis2_char_t(const axutil_env_t* env,
 			     tcpmon_util_allocator_t* allocator,
 			     axis2_char_t c,
 			     int turns);
+*/
 
 axis2_char_t* 
 tcpmon_util_format_as_xml(const axutil_env_t* env, axis2_char_t* data, int format)
@@ -337,7 +339,7 @@
     return data;
 }
 
-void add_string(const axutil_env_t* env,
+/*void add_string(const axutil_env_t* env,
 		tcpmon_util_allocator_t* allocator,
 		axis2_char_t* string)
 {
@@ -363,16 +365,15 @@
       allocator-> allocated += additional_len;
     }
 
-  /* copy memory */
   dest = allocator-> buffer + allocator-> index;
   src = string;
-  count = additional_len; /* this is with the terminating zero */
+  count = additional_len; 
   memcpy(dest, src, count);
 
   allocator-> index += count - 1;
 }
-
-void add_axis2_char_t(const axutil_env_t* env,
+*/
+/*void add_axis2_char_t(const axutil_env_t* env,
 		      tcpmon_util_allocator_t* allocator,
 		      axis2_char_t c,
 		      int turns)
@@ -396,12 +397,11 @@
       allocator-> allocated += additional_len;
     }
 
-  /* copy memory */
   memset(allocator-> buffer + allocator-> index, c, turns);
 
   allocator-> index += turns;
 
-}
+} */
 
 axis2_char_t* tcpmon_strcat(axis2_char_t *dest, axis2_char_t *source, int *buff_size, const axutil_env_t* env)
 {
@@ -423,5 +423,7 @@
     {
         strcat((char*)dest, (char*)source);
     }
+
+    return dest;
 }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org