diff options
Diffstat (limited to 'TAO/tao/Connection_Handler.cpp')
-rw-r--r-- | TAO/tao/Connection_Handler.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 838774ad068..6401fac6155 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -1,11 +1,11 @@ //$Id$ -#include "Connection_Handler.h" -#include "ORB_Core.h" -#include "debug.h" -#include "Resume_Handle.h" -#include "Transport.h" -#include "Wait_Strategy.h" +#include "tao/Connection_Handler.h" +#include "tao/ORB_Core.h" +#include "tao/debug.h" +#include "tao/Resume_Handle.h" +#include "tao/Transport.h" +#include "tao/Wait_Strategy.h" #include "ace/SOCK.h" #include "ace/Reactor.h" @@ -21,6 +21,8 @@ ACE_RCSID (tao, Connection_Handler, "$Id$") +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) : orb_core_ (orb_core) , transport_ (0) @@ -38,7 +40,7 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) TAO_Connection_Handler::~TAO_Connection_Handler (void) { - int result = + int const result = this->release_os_resources (); if (result == -1 && TAO_debug_level) @@ -201,6 +203,7 @@ TAO_Connection_Handler::handle_output_eh ( return_value = this->transport ()->handle_output (); this->pos_io_hook (return_value); + if (return_value != 0) { resume_handle.set_flag (TAO_Resume_Handle::TAO_HANDLE_LEAVE_SUSPENDED); @@ -225,7 +228,7 @@ TAO_Connection_Handler::handle_input_eh ( return 0; } - int result = this->handle_input_internal (h, eh); + int const result = this->handle_input_internal (h, eh); if (result == -1) { @@ -246,7 +249,7 @@ TAO_Connection_Handler::handle_input_internal ( // Grab the transport id now and use the cached value for printing // since the transport could dissappear by the time the thread // returns. - size_t t_id = + size_t const t_id = this->transport ()->id (); if (TAO_debug_level > 6) @@ -271,6 +274,10 @@ TAO_Connection_Handler::handle_input_internal ( this->pos_io_hook (return_value); + // Bug 1647; might need to change resume_handle's flag or + // change handle_input return value. + resume_handle.handle_input_return_value_hook(return_value); + if (TAO_debug_level > 6) { ACE_HANDLE handle = eh->get_handle (); @@ -280,6 +287,8 @@ TAO_Connection_Handler::handle_input_internal ( t_id, handle, h, return_value)); } + if (return_value == -1) + resume_handle.set_flag (TAO_Resume_Handle::TAO_HANDLE_LEAVE_SUSPENDED); return return_value; } @@ -289,7 +298,7 @@ TAO_Connection_Handler::close_connection_eh (ACE_Event_Handler *eh) // Save the ID for debugging messages ACE_HANDLE handle = eh->get_handle (); - size_t id = this->transport ()->id (); + size_t const id = this->transport ()->id (); if (TAO_debug_level) { ACE_DEBUG ((LM_DEBUG, @@ -421,3 +430,5 @@ TAO_Connection_Handler::close_handler (void) } //@@ CONNECTION_HANDLER_SPL_METHODS_ADD_HOOK + +TAO_END_VERSIONED_NAMESPACE_DECL |