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 di...@apache.org on 2006/12/11 09:59:42 UTC
svn commit: r485566 - in /webservices/axis2/trunk/c/tools/tcpmon:
include/tcpmon_entry.h src/entry.c src/session.c src/tcpmon.c
Author: dinesh
Date: Mon Dec 11 00:59:41 2006
New Revision: 485566
URL: http://svn.apache.org/viewvc?view=rev&rev=485566
Log:
tcpmon formatting
Modified:
webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h
webservices/axis2/trunk/c/tools/tcpmon/src/entry.c
webservices/axis2/trunk/c/tools/tcpmon/src/session.c
webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.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=485566&r1=485565&r2=485566
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/include/tcpmon_entry.h Mon Dec 11 00:59:41 2006
@@ -123,7 +123,15 @@
axis2_bool_t (AXIS2_CALL *
is_success) (tcpmon_entry_t *entry,
const axis2_env_t *env);
-
+
+ int (AXIS2_CALL *
+ get_format_bit) (tcpmon_entry_t *entry,
+ axis2_env_t *env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_format_bit) (tcpmon_entry_t *entry,
+ const axis2_env_t *env,
+ int format_bit);
};
struct tcpmon_entry
@@ -167,6 +175,12 @@
#define TCPMON_ENTRY_IS_SUCCESS(entry, env) \
((entry)->ops->is_success(entry, env))
+
+#define TCPMON_ENTRY_SET_FORMAT_BIT(entry, env, format_bit) \
+ ((entry)->ops->set_format_bit(entry, env, format_bit))
+
+#define TCPMON_ENTRY_GET_FORMAT_BIT(entry, env) \
+ ((entry)->ops->get_format_bit(entry, 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=485566&r1=485565&r2=485566
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/entry.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/entry.c Mon Dec 11 00:59:41 2006
@@ -43,6 +43,7 @@
axis2_bool_t is_success;
axis2_char_t* time_diff;
axis2_char_t* test_file_name;
+ int format_bit;
}
tcpmon_entry_impl_t;
@@ -103,6 +104,14 @@
int
write_to_file (char *filename,
char *buffer);
+
+int AXIS2_CALL
+tcpmon_entry_get_format_bit(tcpmon_entry_t *entry,
+ const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
+tcpmon_entry_set_format_bit(tcpmon_entry_t *entry,
+ const axis2_env_t *env,
+ int format_bit);
/************************** End of function prototypes ************************/
tcpmon_entry_t * AXIS2_CALL
@@ -129,6 +138,7 @@
entry_impl -> arrived_headers = NULL;
entry_impl -> sent_headers = NULL;
entry_impl -> is_success = AXIS2_FALSE;
+ entry_impl -> format_bit = 0;
entry_impl->entry.ops =
AXIS2_MALLOC(env->allocator, sizeof(tcpmon_entry_ops_t));
@@ -148,6 +158,8 @@
entry_impl->entry.ops->arrived_data = tcpmon_entry_arrived_data;
entry_impl->entry.ops->arrived_headers = tcpmon_entry_arrived_headers;
entry_impl->entry.ops->is_success = tcpmon_entry_is_success;
+ entry_impl->entry.ops->set_format_bit = tcpmon_entry_set_format_bit;
+ entry_impl->entry.ops->get_format_bit = tcpmon_entry_get_format_bit;
return &(entry_impl->entry);
}
@@ -320,6 +332,34 @@
return entry_impl-> is_success;
}
+int AXIS2_CALL
+tcpmon_entry_get_format_bit(tcpmon_entry_t *entry,
+ const axis2_env_t *env)
+{
+ tcpmon_entry_impl_t *entry_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+
+ entry_impl = AXIS2_INTF_TO_IMPL(entry);
+
+ return entry_impl->format_bit;
+}
+
+axis2_status_t AXIS2_CALL
+tcpmon_entry_set_format_bit(tcpmon_entry_t *entry,
+ const axis2_env_t *env,
+ int format_bit)
+{
+ tcpmon_entry_impl_t *entry_impl = NULL;
+
+ AXIS2_ENV_CHECK (env, AXIS2_FAILURE);
+
+ entry_impl = AXIS2_INTF_TO_IMPL(entry);
+
+ entry_impl->format_bit = format_bit;
+
+ return AXIS2_SUCCESS;
+}
/** implimentations for protected methods */
/** executes as new entry arises */
@@ -347,6 +387,7 @@
int target_port = 0;
axis2_char_t* target_host = NULL;
int test_bit = 0;
+ int format_bit = 0;
tcpmon_entry_t* entry = NULL;
tcpmon_entry_impl_t* entry_impl = NULL;
@@ -403,6 +444,10 @@
{
write_to_file ("reqest", buffer);
}
+
+ format_bit = TCPMON_SESSION_GET_FORMAT_BIT(session, env);
+ TCPMON_ENTRY_SET_FORMAT_BIT(entry, env, format_bit);
+
now = time(NULL);
localTime = localtime(&now);
Modified: webservices/axis2/trunk/c/tools/tcpmon/src/session.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/tools/tcpmon/src/session.c?view=diff&rev=485566&r1=485565&r2=485566
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/session.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/session.c Mon Dec 11 00:59:41 2006
@@ -172,7 +172,7 @@
session_impl->session.ops->set_test_bit = tcpmon_session_set_test_bit;
session_impl->session.ops->get_test_bit = tcpmon_session_get_test_bit;
session_impl->session.ops->get_format_bit = tcpmon_session_get_format_bit;
- session_impl->session.ops->set_format_bit = tcpmon_session_get_format_bit;
+ session_impl->session.ops->set_format_bit = tcpmon_session_set_format_bit;
session_impl->session.ops->set_listen_port = tcpmon_session_set_listen_port;
session_impl->session.ops->get_listen_port = tcpmon_session_get_listen_port;
session_impl->session.ops->set_target_port = tcpmon_session_set_target_port;
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=485566&r1=485565&r2=485566
==============================================================================
--- webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/trunk/c/tools/tcpmon/src/tcpmon.c Mon Dec 11 00:59:41 2006
@@ -110,7 +110,7 @@
TCPMON_SESSION_ON_TRANS_FAULT(session, env, on_error_func);
TCPMON_SESSION_ON_NEW_ENTRY(session, env, on_new_entry);
TCPMON_SESSION_SET_TEST_BIT (session, env, test_bit);
- TCPMON_SESSION_SET_FORMAT_BIT(session, env, format_bit);
+ TCPMON_SESSION_SET_FORMAT_BIT(session, env, format_bit);
TCPMON_SESSION_START(session, env);
do
@@ -133,7 +133,10 @@
{
char* plain_buffer = NULL;
char* formated_buffer = NULL;
- int format = 1;
+ int format = 0;
+
+ format = TCPMON_ENTRY_GET_FORMAT_BIT(entry, env);
+
if (status == 0)
{
plain_buffer = TCPMON_ENTRY_SENT_DATA(entry, env);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org