diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-08-06 18:21:48 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-08-06 18:21:48 +0000 |
commit | 09a2449f11bccb5f1eaeaccc0c300c1813d94655 (patch) | |
tree | c975d60466963e31072f1ed27dbcfce387cf02cd /ACE/examples/C++NPv2 | |
parent | e88999beef0d5bb108135f2fe442895aac704db8 (diff) | |
download | ATCD-09a2449f11bccb5f1eaeaccc0c300c1813d94655.tar.gz |
ChangeLogTag: Wed Aug 6 18:17:32 UTC 2008 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'ACE/examples/C++NPv2')
-rw-r--r-- | ACE/examples/C++NPv2/AC_Client_Logging_Daemon.cpp | 21 | ||||
-rw-r--r-- | ACE/examples/C++NPv2/Client_Logging_Daemon.cpp | 24 |
2 files changed, 28 insertions, 17 deletions
diff --git a/ACE/examples/C++NPv2/AC_Client_Logging_Daemon.cpp b/ACE/examples/C++NPv2/AC_Client_Logging_Daemon.cpp index 415bd0c6c51..cb82344fd30 100644 --- a/ACE/examples/C++NPv2/AC_Client_Logging_Daemon.cpp +++ b/ACE/examples/C++NPv2/AC_Client_Logging_Daemon.cpp @@ -270,15 +270,20 @@ int AC_Input_Handler::handle_input (ACE_HANDLE handle) { ACE_Message_Block *mblk = 0; Logging_Handler logging_handler (handle); - if (logging_handler.recv_log_record (mblk) != -1) { - if (output_handler_->put (mblk->cont ()) != -1) { - mblk->cont (0); - mblk->release (); - return 0; // Success return. - } else { - mblk->release (); + if (logging_handler.recv_log_record (mblk) != -1) + { + if (output_handler_->put (mblk->cont ()) != -1) + { + mblk->cont (0); + mblk->release (); + return 0; // Success return. + } + else + { + mblk->release (); + } } - } + return -1; // Error return. } diff --git a/ACE/examples/C++NPv2/Client_Logging_Daemon.cpp b/ACE/examples/C++NPv2/Client_Logging_Daemon.cpp index de8ab19c40a..7a5aed47099 100644 --- a/ACE/examples/C++NPv2/Client_Logging_Daemon.cpp +++ b/ACE/examples/C++NPv2/Client_Logging_Daemon.cpp @@ -122,19 +122,25 @@ protected: /****************************************************/ -int CLD_Handler::handle_input (ACE_HANDLE handle) { +int CLD_Handler::handle_input (ACE_HANDLE handle) +{ ACE_Message_Block *mblk = 0; Logging_Handler logging_handler (handle); - if (logging_handler.recv_log_record (mblk) != -1) { - if (msg_queue_.enqueue_tail (mblk->cont ()) != -1) { - mblk->cont (0); - mblk->release (); - return 0; // Success return. - } else { - mblk->release (); + if (logging_handler.recv_log_record (mblk) != -1) + { + if (msg_queue_.enqueue_tail (mblk->cont ()) != -1) + { + mblk->cont (0); + mblk->release (); + return 0; // Success return. + } + else + { + mblk->release (); + } } - } + return -1; // Error return. } |