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 se...@apache.org on 2008/03/10 19:57:07 UTC

svn commit: r635651 - in /webservices/axis2/trunk/c/tools/tcpmon/src: entry.c tcpmon.c

Author: senaka
Date: Mon Mar 10 11:56:52 2008
New Revision: 635651

URL: http://svn.apache.org/viewvc?rev=635651&view=rev
Log:
Getting TCPMon Resending to work on MS Windows

Modified:
    webservices/axis2/trunk/c/tools/tcpmon/src/entry.c
    webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c

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?rev=635651&r1=635650&r2=635651&view=diff
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/entry.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/entry.c Mon Mar 10 11:56:52 2008
@@ -900,7 +900,7 @@
     int size = 0;
     if (filename)
     {
-        FILE *fp = fopen(filename, "a+");
+        FILE *fp = fopen(filename, "ab");
         size = (int)fwrite(buffer, 1, strlen(buffer), fp);
         /* We are sure that the difference lies within the int range */
         fclose(fp);

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?rev=635651&r1=635650&r2=635651&view=diff
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c Mon Mar 10 11:56:52 2008
@@ -249,7 +249,7 @@
     char *uuid = NULL;
     int resend = 0;
 
-    file = fopen(tcpmon_traffic_log, "a+");
+    file = fopen(tcpmon_traffic_log, "ab");
 
     if (NULL == file)
     {
@@ -532,7 +532,7 @@
         uuid[i] = '\0';
     }
 
-    file = fopen(tcpmon_traffic_log, "r");
+    file = fopen(tcpmon_traffic_log, "rb");
 
     if (NULL == file)
     {
@@ -546,6 +546,7 @@
         printf("\ngimme more memory\n");
         return -1;
     }
+    buffer[SIZE - 1] = '\0';
 
     read_len = (int)fread(buffer, sizeof(char), SIZE - 1, file);
 
@@ -559,7 +560,7 @@
         int offset = 0;
         int loop_state = 1;
         int end_reached = 0;
-        int rounds = -1;
+        int rounds = 0;
 
         offset = (int)strlen(search);
         tmp3 = buffer;



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