You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by se...@apache.org on 2008/03/09 21:26:54 UTC

svn commit: r635346 - /webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c

Author: senaka
Date: Sun Mar  9 13:26:51 2008
New Revision: 635346

URL: http://svn.apache.org/viewvc?rev=635346&view=rev
Log:
Adding informative title for resent requests

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

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=635346&r1=635345&r2=635346&view=diff
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c Sun Mar  9 13:26:51 2008
@@ -246,6 +246,7 @@
     FILE *file;
     char *convert = NULL;
     char *uuid = NULL;
+    int resend = 0;
 
     file = fopen(tcpmon_traffic_log, "a+");
 
@@ -262,6 +263,10 @@
 
     if (status == 0)
     {
+        if (strstr(TCPMON_ENTRY_SENT_HEADERS(entry, env), "User-Agent: Axis2/C TCPMon\r\n"))
+        {
+            resend = 1;
+        }
         plain_buffer = TCPMON_ENTRY_SENT_DATA(entry, env);
         if (plain_buffer)       /* this can be possible as no xml present */
         {
@@ -279,7 +284,7 @@
             formated_buffer = "";
         }
         /* 2 screen */
-        printf("\n\n%s\n", "SENDING DATA..");
+        printf("\n\n%s\n", resend ? "RESENDING DATA..": "SENDING DATA..");
         printf("/* sending time = %s*/\n", TCPMON_ENTRY_SENT_TIME(entry, env));
         uuid = axutil_uuid_gen(env);
         printf("/* message uuid = %s*/\n", uuid);
@@ -319,7 +324,7 @@
         }
 
         /* 2 file */
-        fprintf(file, "%s\n", "SENDING DATA..");
+        fprintf(file, "%s\n", resend ? "RESENDING DATA..": "SENDING DATA..");
         fprintf(file, "/* sending time = %s*/\n",
                 TCPMON_ENTRY_SENT_TIME(entry, env));
         fprintf(file, "/* message uuid = %s*/\n", uuid);
@@ -797,11 +802,16 @@
     char *formated_buffer = NULL;
     int format = 0;
     char *uuid = NULL;
+    int resend = 0;
 
     format = TCPMON_ENTRY_GET_FORMAT_BIT(entry, env);
 
     if (status == 0)
     {
+        if (strstr(TCPMON_ENTRY_SENT_HEADERS(entry, env), "User-Agent: Axis2/C TCPMon\r\n"))
+        {
+            resend = 1;
+        }
         plain_buffer = TCPMON_ENTRY_SENT_DATA(entry, env);
         if (plain_buffer)       /* this can be possible as no xml present */
         {
@@ -818,7 +828,7 @@
         {
             formated_buffer = "";
         }
-        printf("\n\n%s\n", "SENDING DATA..");
+        printf("\n\n%s\n", resend ? "RESENDING DATA..": "SENDING DATA..");
         printf("/* sending time = %s*/\n", TCPMON_ENTRY_SENT_TIME(entry, env));
         uuid = axutil_uuid_gen(env);
         printf("/* message uuid = %s*/\n", uuid);



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