diff options
Diffstat (limited to 'examples/Connection')
-rw-r--r-- | examples/Connection/blocking/SPIPE-connector.cpp | 9 | ||||
-rw-r--r-- | examples/Connection/non_blocking/CPP-acceptor.cpp | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/examples/Connection/blocking/SPIPE-connector.cpp b/examples/Connection/blocking/SPIPE-connector.cpp index 940f716433f..3bc22f1a280 100644 --- a/examples/Connection/blocking/SPIPE-connector.cpp +++ b/examples/Connection/blocking/SPIPE-connector.cpp @@ -30,7 +30,7 @@ Peer_Handler::open (void *) if (ACE::register_stdin_handler (this, ACE_Service_Config::reactor (), ACE_Service_Config::thr_mgr ()) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_stdin_handler")); + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_stdin_handler"), -1); } else // If iterations_ has been set, send iterations_ buffers. { @@ -46,9 +46,8 @@ Peer_Handler::open (void *) while (iterations_-- > 0 && this->peer ().send_n (buffer, length) == length) continue; - - return this->peer ().close (); } + return this->peer ().close (); } int @@ -93,8 +92,8 @@ Peer_Handler::display_menu (void) } IPC_Client::IPC_Client (void) - : rendezvous_ ("acepipe"), - iterations_ (0), + : iterations_ (0), + rendezvous_ ("acepipe"), done_handler_ (ACE_Sig_Handler_Ex (ACE_Service_Config::end_proactor_event_loop)) { } diff --git a/examples/Connection/non_blocking/CPP-acceptor.cpp b/examples/Connection/non_blocking/CPP-acceptor.cpp index e3c69ccfddc..e01586cc0d3 100644 --- a/examples/Connection/non_blocking/CPP-acceptor.cpp +++ b/examples/Connection/non_blocking/CPP-acceptor.cpp @@ -101,7 +101,7 @@ IPC_Server<SH, PR_AC_2>::init (int argc, char *argv[]) // Handle SIGPIPE signal through the ACE_Reactor. else if (ACE_Service_Config::reactor ()->register_handler (SIGPIPE, &this->done_handler_) == -1) - ACE_ERROR ((LM_ERROR, "%p\n", "register_handler")); + ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "register_handler"), -1); else return 0; } |