diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 00:18:45 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-02-22 00:18:45 +0000 |
commit | 0385754fbdac30fb19cf8cff20c05e49b4718cf5 (patch) | |
tree | a18314a72bf1f79a83f77b8864df954fd60d996d /apps/Gateway/Gateway | |
parent | 785bb81342cbee2d45ee1ddcbfa3dfb9178d5c90 (diff) | |
download | ATCD-0385754fbdac30fb19cf8cff20c05e49b4718cf5.tar.gz |
foo
Diffstat (limited to 'apps/Gateway/Gateway')
-rw-r--r-- | apps/Gateway/Gateway/Concrete_Proxy_Handlers.cpp | 10 | ||||
-rw-r--r-- | apps/Gateway/Gateway/Event_Channel.cpp | 3 | ||||
-rw-r--r-- | apps/Gateway/Gateway/Event_Channel.h | 3 | ||||
-rw-r--r-- | apps/Gateway/Gateway/Gateway.cpp | 5 | ||||
-rw-r--r-- | apps/Gateway/Gateway/proxy_config | 2 |
5 files changed, 13 insertions, 10 deletions
diff --git a/apps/Gateway/Gateway/Concrete_Proxy_Handlers.cpp b/apps/Gateway/Gateway/Concrete_Proxy_Handlers.cpp index 7f5c1d9ab6c..96d1177dc7e 100644 --- a/apps/Gateway/Gateway/Concrete_Proxy_Handlers.cpp +++ b/apps/Gateway/Gateway/Concrete_Proxy_Handlers.cpp @@ -339,14 +339,10 @@ Supplier_Proxy::recv (ACE_Message_Block *&forward_addr) } this->total_bytes (data_received + header_received); -#if defined (VERBOSE) - ACE_DEBUG ((LM_DEBUG, "(%t) connection id = %d, supplier id = %d, len = %d, payload = %*s", - event_addr.proxy_id_, event->header_.supplier_id_, event->header_.len_, - event->header_.len_, event->data_)); -#else ACE_DEBUG ((LM_DEBUG, "(%t) supplier id = %d, cur len = %d, total bytes read = %d\n", - event->header_.supplier_id_, event->header_.len_, data_received + header_received)); -#endif /* VERBOSE */ + event->header_.supplier_id_, event->header_.len_, data_received + header_received)); + if (this->event_channel_.options ().verbose_) + ACE_DEBUG ((LM_DEBUG, "data_ = %*s\n", event->header_.len_ - 2, event->data_)); // Encode before returning so that we can set things out in // network byte order. diff --git a/apps/Gateway/Gateway/Event_Channel.cpp b/apps/Gateway/Gateway/Event_Channel.cpp index 5c2f3ee93ca..c23e57d728b 100644 --- a/apps/Gateway/Gateway/Event_Channel.cpp +++ b/apps/Gateway/Gateway/Event_Channel.cpp @@ -13,7 +13,8 @@ ACE_Event_Channel_Options::ACE_Event_Channel_Options (void) threading_strategy_ (REACTIVE), acceptor_port_ (ACE_DEFAULT_GATEWAY_SERVER_PORT), connector_role_ (0), - acceptor_role_ (0) + acceptor_role_ (0), + verbose_ (0) { } diff --git a/apps/Gateway/Gateway/Event_Channel.h b/apps/Gateway/Gateway/Event_Channel.h index 22dd8137147..9ef23732328 100644 --- a/apps/Gateway/Gateway/Event_Channel.h +++ b/apps/Gateway/Gateway/Event_Channel.h @@ -75,6 +75,9 @@ public: int acceptor_role_; // Enabled if we are playing the role of the Connector. + + int verbose_; + // Enabled if we want verbose diagnostic output. }; class ACE_Svc_Export ACE_Event_Channel : public ACE_Task<ACE_SYNCH> diff --git a/apps/Gateway/Gateway/Gateway.cpp b/apps/Gateway/Gateway/Gateway.cpp index f9d505a5733..867865ff0e8 100644 --- a/apps/Gateway/Gateway/Gateway.cpp +++ b/apps/Gateway/Gateway/Gateway.cpp @@ -98,7 +98,7 @@ Gateway::parse_args (int argc, char *argv[]) ACE_OS::strcpy (this->consumer_config_file_, "consumer_config"); this->debug_ = 0; - ACE_Get_Opt get_opt (argc, argv, "abC:cdP:pq:t:w:", 0); + ACE_Get_Opt get_opt (argc, argv, "abC:cdP:pq:t:vw:", 0); for (int c; (c = get_opt ()) != EOF; ) { @@ -151,6 +151,9 @@ Gateway::parse_args (int argc, char *argv[]) break; } + case 'v': // Verbose mode. + this->event_channel_.options ().verbose_ = 1; + break; case 'w': // Time performance for a designated amount of time. this->event_channel_.options ().performance_window_ = ACE_OS::atoi (get_opt.optarg); diff --git a/apps/Gateway/Gateway/proxy_config b/apps/Gateway/Gateway/proxy_config index e0784e4038e..df034f543b1 100644 --- a/apps/Gateway/Gateway/proxy_config +++ b/apps/Gateway/Gateway/proxy_config @@ -35,7 +35,7 @@ # ID Port Role Timeout Port # ---- -------- ------ ------ ---------- ----- -------- 1 merengue.cs 10010 S 32 0 1 - 2 tango.cs 10010 C 32 0 1 + 2 mambo.cs 10010 C 32 0 1 # 3 mambo.cs 10002 C 32 0 1 # 4 lambada.cs 10002 C 32 0 1 # 5 lambada.cs 10002 C 32 0 1 |