diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-16 21:19:02 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-09-16 21:19:02 +0000 |
commit | 40fdc8a404e75ab03b68cc62e9987cf208fd8c30 (patch) | |
tree | 37d9c4d3abe4aefd8a34ed797883dd2cd4862ca7 /TAO/tao/Strategies/SCIOP_Connection_Handler.cpp | |
parent | c254b281f1b9a4ca19dd0c3ee73a0654a7718909 (diff) | |
download | ATCD-40fdc8a404e75ab03b68cc62e9987cf208fd8c30.tar.gz |
This commit was manufactured by cvs2svn to create branchtypecode-overhaul
'typecode-overhaul'.
Diffstat (limited to 'TAO/tao/Strategies/SCIOP_Connection_Handler.cpp')
-rw-r--r-- | TAO/tao/Strategies/SCIOP_Connection_Handler.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp index 60d586cef75..39d4a1125a6 100644 --- a/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/SCIOP_Connection_Handler.cpp @@ -154,16 +154,14 @@ TAO_SCIOP_Connection_Handler::open (void*) return -1; ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - SCIOP_Connection_Handler::open, SCIOP ") + ACE_TEXT ("TAO (%P|%t) - Connection_Handler::open, SCIOP ") ACE_TEXT ("connection to peer <%s> on %d\n"), client, this->peer ().get_handle ())); } - // Set that the transport is now connected, if fails we return -1 - // Use C-style cast b/c otherwise we get warnings on lots of - // compilers - if (!this->transport ()->post_open ((size_t) this->get_handle ())) - return -1; + // Set the id in the transport now that we're active. + // Use C-style cast b/c otherwise we get warnings on lots of compilers + this->transport ()->id ((size_t) this->get_handle ()); this->state_changed (TAO_LF_Event::LFS_SUCCESS); @@ -185,7 +183,16 @@ TAO_SCIOP_Connection_Handler::close_connection (void) int TAO_SCIOP_Connection_Handler::handle_input (ACE_HANDLE h) { - return this->handle_input_eh (h, this); + int result = + this->handle_input_eh (h, this); + + if (result == -1) + { + this->close_connection (); + return 0; + } + + return result; } int @@ -224,7 +231,9 @@ TAO_SCIOP_Connection_Handler::handle_close (ACE_HANDLE, int TAO_SCIOP_Connection_Handler::close (u_long) { - return this->close_handler (); + this->state_changed (TAO_LF_Event::LFS_CONNECTION_CLOSED); + this->transport ()->remove_reference (); + return 0; } int |