diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-12-17 19:05:35 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-12-17 19:05:35 +0000 |
commit | b04ebbbcabc2a64a893337882c9fe214334273b9 (patch) | |
tree | 0626e49e58430ca3c7753560819b12d63f499564 /apps | |
parent | b2d6ed41b6163ff286ca39b5638da486e873784c (diff) | |
download | ATCD-b04ebbbcabc2a64a893337882c9fe214334273b9.tar.gz |
.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/Gateway/Gateway/Gateway.cpp | 5 | ||||
-rw-r--r-- | apps/Gateway/Peer/Peer.cpp | 64 | ||||
-rw-r--r-- | apps/JAWS/remora/app/test.cc | 5 | ||||
-rw-r--r-- | apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp | 6 | ||||
-rw-r--r-- | apps/Orbix-Examples/Event_Comm/Supplier/supplier.cpp | 3 |
5 files changed, 46 insertions, 37 deletions
diff --git a/apps/Gateway/Gateway/Gateway.cpp b/apps/Gateway/Gateway/Gateway.cpp index ec71e034228..1230220adbf 100644 --- a/apps/Gateway/Gateway/Gateway.cpp +++ b/apps/Gateway/Gateway/Gateway.cpp @@ -54,11 +54,8 @@ protected: int Gateway::handle_signal (int signum, siginfo_t *, ucontext_t *) { - if (signum > 0) - ACE_DEBUG ((LM_DEBUG, "(%t) %S\n", signum)); - // Shut down the main event loop. - ACE_Reactor::end_event_loop(); + ACE_Reactor::end_event_loop (); return 0; } diff --git a/apps/Gateway/Peer/Peer.cpp b/apps/Gateway/Peer/Peer.cpp index 429a4c24522..79ab12659b3 100644 --- a/apps/Gateway/Peer/Peer.cpp +++ b/apps/Gateway/Peer/Peer.cpp @@ -29,10 +29,16 @@ Peer_Handler::open (void *a) // Call down to the base class to activate and register this handler // with an <ACE_Reactor>. if (this->inherited::open (a) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "open"), + -1); if (this->peer ().enable (ACE_NONBLOCK) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "enable"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "enable"), + -1); ACE_Time_Value timeout (Options::instance ()->timeout ()); @@ -118,7 +124,8 @@ Peer_Handler::transmit_stdin (void) switch (n) { case 0: - ACE_DEBUG ((LM_DEBUG, "stdin closing down\n")); + ACE_DEBUG ((LM_DEBUG, + "stdin closing down\n")); // Take stdin out of the ACE_Reactor so we stop trying to // send events. @@ -130,7 +137,9 @@ Peer_Handler::transmit_stdin (void) /* NOTREACHED */ case -1: mb->release (); - ACE_ERROR ((LM_ERROR, "%p\n", "read")); + ACE_ERROR ((LM_ERROR, + "%p\n", + "read")); break; /* NOTREACHED */ default: @@ -140,7 +149,8 @@ Peer_Handler::transmit_stdin (void) return 0; } - ACE_DEBUG ((LM_DEBUG, "Must transmit over an opened channel.\n")); + ACE_DEBUG ((LM_DEBUG, + "Must transmit over an opened channel.\n")); return -1; } @@ -197,10 +207,12 @@ Peer_Handler::handle_output (ACE_HANDLE) { ACE_Message_Block *mb = 0; - ACE_DEBUG ((LM_DEBUG, "in handle_output\n")); + ACE_DEBUG ((LM_DEBUG, + "in handle_output\n")); if (this->msg_queue ()->dequeue_head - (mb, (ACE_Time_Value *) &ACE_Time_Value::zero) != -1) + (mb, + (ACE_Time_Value *) &ACE_Time_Value::zero) != -1) { switch (this->nonblk_put (mb)) { @@ -289,8 +301,10 @@ Peer_Handler::send (ACE_Message_Block *mb) errno = 0; } - ACE_DEBUG ((LM_DEBUG, "sent %d bytes, total bytes sent = %d\n", - n, this->total_bytes_)); + ACE_DEBUG ((LM_DEBUG, + "sent %d bytes, total bytes sent = %d\n", + n, + this->total_bytes_)); return n; } @@ -433,7 +447,9 @@ Peer_Handler::recv (ACE_Message_Block *&mb) int Peer_Handler::handle_input (ACE_HANDLE sd) { - ACE_DEBUG ((LM_DEBUG, "in handle_input, sd = %d\n", sd)); + ACE_DEBUG ((LM_DEBUG, + "in handle_input, sd = %d\n", + sd)); if (sd == ACE_STDIN) // Handle event from stdin. return this->transmit_stdin (); else @@ -483,11 +499,14 @@ Peer_Handler::await_connection_id (void) ACE_OS::rewind (stdin); // Register this handler to receive test events on stdin. - if (ACE_Event_Handler::register_stdin_handler (this, - ACE_Reactor::instance (), - ACE_Thread_Manager::instance ()) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "(%t) %p\n", "register_stdin_handler"), -1); - + if (ACE_Event_Handler::register_stdin_handler + (this, + ACE_Reactor::instance (), + ACE_Thread_Manager::instance ()) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "(%t) %p\n", + "register_stdin_handler"), + -1); return 0; } @@ -578,10 +597,12 @@ Peer_Handler::handle_close (ACE_HANDLE, { if (this->get_handle () != ACE_INVALID_HANDLE) { - ACE_DEBUG ((LM_DEBUG, "shutting down Peer on handle %d\n", + ACE_DEBUG ((LM_DEBUG, + "shutting down Peer on handle %d\n", this->get_handle ())); - ACE_Reactor_Mask mask = ACE_Event_Handler::DONT_CALL | ACE_Event_Handler::READ_MASK; + ACE_Reactor_Mask mask = + ACE_Event_Handler::DONT_CALL | ACE_Event_Handler::READ_MASK; // Explicitly remove ourselves for ACE_STDIN (the <ACE_Reactor> // removes the HANDLE. Note that <ACE_Event_Handler::DONT_CALL> @@ -715,10 +736,6 @@ Peer_Connector::open (ACE_Reactor *, int) int Peer_Factory::handle_signal (int signum, siginfo_t *, ucontext_t *) { - ACE_DEBUG ((LM_DEBUG, - "signal %S occurred\n", - signum)); - if (signum != SIGPIPE) // Shut down the main event loop. ACE_Reactor::end_event_loop(); @@ -793,7 +810,10 @@ Peer_Factory::init (int argc, char *argv[]) if (ACE_Reactor::instance ()->register_handler (sig_set, this) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n", + "register_handler"), + -1); if (Options::instance ()->enabled (Options::SUPPLIER_ACCEPTOR) && this->consumer_acceptor_.open diff --git a/apps/JAWS/remora/app/test.cc b/apps/JAWS/remora/app/test.cc index 76158aac5a5..987c7bd07af 100644 --- a/apps/JAWS/remora/app/test.cc +++ b/apps/JAWS/remora/app/test.cc @@ -12,7 +12,7 @@ class Shutdown : public ACE_Event_Handler public: Shutdown(int& cond) : cond_(cond) {} - virtual int handle_signal(int, siginfo*, ucontext*) + virtual int handle_signal (int, siginfo*, ucontext*) { this->cond_ = 0; return 0; @@ -23,14 +23,13 @@ private: int& cond_; }; - int main(int argc, char** argv) { int lcv = 1; ACE_Sig_Handler shutdown; - shutdown.register_handler(SIGINT, new Shutdown(lcv)); + shutdown.register_handler (SIGINT, new Shutdown (lcv)); try { diff --git a/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp b/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp index 1c0b3c083ba..ef0ffe1be82 100644 --- a/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp +++ b/apps/Orbix-Examples/Event_Comm/Consumer/consumer.cpp @@ -44,15 +44,11 @@ Consumer::handle_close (ACE_HANDLE, ACE_Reactor_Mask) int Consumer::handle_signal (int signum, siginfo_t *, ucontext_t *) { - ACE_DEBUG ((LM_DEBUG, - "%S\n", - signum)); - // Indicate that the consumer initiated the shutdown. this->ih_->consumer_initiated_shutdown (1); // Shut down the event loop. - ACE_Reactor::end_event_loop(); + ACE_Reactor::end_event_loop (); return 0; } diff --git a/apps/Orbix-Examples/Event_Comm/Supplier/supplier.cpp b/apps/Orbix-Examples/Event_Comm/Supplier/supplier.cpp index ecae0c45eb2..ef1e2c5d914 100644 --- a/apps/Orbix-Examples/Event_Comm/Supplier/supplier.cpp +++ b/apps/Orbix-Examples/Event_Comm/Supplier/supplier.cpp @@ -50,9 +50,6 @@ Supplier::handle_close (ACE_HANDLE, ACE_Reactor_Mask) int Supplier::handle_signal (int signum, siginfo_t *, ucontext_t *) { - ACE_DEBUG ((LM_DEBUG, - "%S\n", - signum)); ACE_Reactor::end_event_loop (); return 0; } |