summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
index 980a4d6cf68..6660602351c 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
@@ -164,11 +164,10 @@ TAO::SSLIOP::Connection_Handler::open (void *)
this->peer ().get_handle ()));
}
- // Set that the transport is now connected, if fails we 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
- if (!this->transport ()->post_open ((size_t) this->get_handle ()))
- return -1;
+ // compilers.
+ this->transport ()->id ((size_t) this->get_handle ());
// @@ Not needed
this->state_changed (TAO_LF_Event::LFS_SUCCESS);
@@ -191,7 +190,16 @@ TAO::SSLIOP::Connection_Handler::close_connection (void)
int
TAO::SSLIOP::Connection_Handler::handle_input (ACE_HANDLE h)
{
- return this->handle_input_eh (h, this);
+ const int result =
+ this->handle_input_eh (h, this);
+
+ if (result == -1)
+ {
+ this->close_connection ();
+ return 0;
+ }
+
+ return result;
}
int
@@ -230,7 +238,9 @@ TAO::SSLIOP::Connection_Handler::handle_close (ACE_HANDLE,
int
TAO::SSLIOP::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