axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r635207 - /webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c
Date Sun, 09 Mar 2008 10:13:21 GMT
Author: senaka
Date: Sun Mar  9 03:13:18 2008
New Revision: 635207

URL: http://svn.apache.org/viewvc?rev=635207&view=rev
Log:
Adding ability to trap a resend request made to TCPMon

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=635207&r1=635206&r2=635207&view=diff
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c Sun Mar  9 03:13:18 2008
@@ -55,6 +55,10 @@
 void sig_handler(
     int signal);
 
+int resend_request(
+    const axutil_env_t * env,
+    int status);
+
 int
 main(
     int argc,
@@ -210,6 +214,10 @@
             format_bit = format_bit ? 0 : 1;
             TCPMON_SESSION_SET_FORMAT_BIT(session, env, format_bit);
         }
+        else if (c == 'r')
+        {
+            resend_request(env, 0);
+        }
     }
     while (c != 'q');
     printf("\n\n");
@@ -475,6 +483,44 @@
         }
     }
     fclose(file);
+    return 0;
+}
+
+int 
+resend_request(
+    const axutil_env_t * env,
+    int status)
+{
+    if (status == 0)
+    {
+        axis2_char_t *uuid = NULL;
+        int c;
+        int i = 0;
+        do
+        {
+            c = getchar();
+        }
+        while (c == ' ');
+        uuid = AXIS2_MALLOC(env->allocator, sizeof(axis2_char_t) * 37);
+        for (i = 0; i < 36; i++)
+        {
+            if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f')
|| c == '-')
+            {
+                uuid[i] = (axis2_char_t)c;
+            }
+            else if (c >= 'A' && c <= 'F')
+            {
+                uuid[i] = (axis2_char_t)(c + 32);
+            }
+            else
+            {
+                return 0;
+            }
+            c = getchar();
+        }
+        uuid[i] = '\0';
+        printf("\n\n%s", uuid);
+    }
     return 0;
 }
 



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


Mime
View raw message