summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-12-09 22:09:50 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-12-09 22:09:50 +0000
commitd13a4247db55c0a66f4312f2a4104ef07358d382 (patch)
tree485bcd5b07cfc6e313c81153f75eec5d7a26c6ca
parent53348e0d28cf07c399412b52bc535d37bf692223 (diff)
downloadATCD-d13a4247db55c0a66f4312f2a4104ef07358d382.tar.gz
ChangeLogTag:Sun Dec 9 13:50:47 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a29
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp23
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h2
3 files changed, 41 insertions, 13 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index c4821b4059e..accc0ed7470 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,32 @@
+Sun Dec 9 13:50:47 2001 Ossama Othman <ossama@uci.edu>
+
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
+ (handle_close_i):
+
+ This method now accepts the handle that will be closed instead
+ of relying on calling the get_handle() method. This a
+ precautionary measure for avoiding a race condition.
+
+ (handle_close, handle_input, handle_output):
+
+ Pass the handle down to the handle_close_i() method instead of
+ forcing handle_close_i() to call get_handle(). This avoids
+ potential race conditions if the connection handler ever
+ services more than one handle. The race condition doesn't
+ actually exist since TAO always associates a single handle with
+ a given connection handler. So, this change is merely a
+ precaution for potential changes in the future. It also happens
+ to save us a function call (not a big deal in any case).
+
+ (handle_input):
+
+ If the upcall count is zero, then return right away. This fixes
+ a potential problem where the code that causes the reactor to
+ callback the connection handler if data is pending in the
+ OpenSSL internal buffers despite the fact that the connection
+ handler has been shutdown and destroyed. [Bug 943]
+
Sun Dec 09 13:56:41 2001 Carlos O'Ryan <coryan@uci.edu>
* orbsvcs/performance-tests/EC_Scalability/server.cpp:
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
index b0bffd94507..a99057871d6 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.cpp
@@ -222,14 +222,13 @@ TAO_SSLIOP_Connection_Handler::handle_close (ACE_HANDLE handle,
// Try to clean up things if the upcall count has reached 0
if (upcalls == 0)
- this->handle_close_i ();
-
+ this->handle_close_i (handle);
return 0;
}
void
-TAO_SSLIOP_Connection_Handler::handle_close_i (void)
+TAO_SSLIOP_Connection_Handler::handle_close_i (ACE_HANDLE handle)
{
if (TAO_debug_level)
ACE_DEBUG ((LM_DEBUG,
@@ -250,7 +249,7 @@ TAO_SSLIOP_Connection_Handler::handle_close_i (void)
}
// Close the handle..
- if (this->get_handle () != ACE_INVALID_HANDLE)
+ if (handle != ACE_INVALID_HANDLE)
{
// Remove the entry as it is invalid
this->transport ()->purge_entry ();
@@ -273,10 +272,10 @@ TAO_SSLIOP_Connection_Handler::resume_handler (void)
}
int
-TAO_SSLIOP_Connection_Handler::handle_output (ACE_HANDLE)
+TAO_SSLIOP_Connection_Handler::handle_output (ACE_HANDLE handle)
{
- TAO_Resume_Handle resume_handle (this->orb_core (),
- this->get_handle ());
+ TAO_Resume_Handle resume_handle (this->orb_core (),
+ handle);
int result = this->transport ()->handle_output ();
@@ -417,12 +416,12 @@ TAO_SSLIOP_Connection_Handler::handle_input (ACE_HANDLE handle)
// Try to clean up things if the upcall count has reached 0
if (upcalls == 0)
{
- this->handle_close_i ();
+ this->handle_close_i (handle);
- // As we have already performed the handle closing we dont want
- // to return a -1. Doing so would make the reactor call
- // handle_close () which could be harmful.
- retval = 0;
+ // As we have already performed the handle closing we don't want
+ // to return a -1. Doing so would make the reactor call
+ // handle_close() which could be harmful.
+ return 0;
}
// Force this event handler to be called before waiting for
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h
index b96ae000c76..9aa89b66418 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h
@@ -139,7 +139,7 @@ protected:
private:
/// Perform appropriate closing..
- void handle_close_i (void);
+ void handle_close_i (ACE_HANDLE);
private: