diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-05-16 22:29:55 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2002-05-16 22:29:55 +0000 |
commit | 825e023f1cc90c10cccd86dbef0cb6a05661074a (patch) | |
tree | c72f0cd3720a5a2351f85b2c7a23a8e1461b1d8e | |
parent | 5350c7859446ece7cc220cc5835c0068e598ead0 (diff) | |
download | ATCD-825e023f1cc90c10cccd86dbef0cb6a05661074a.tar.gz |
ChangeLogTag:Thu May 16 15:29:33 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 27 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp | 29 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp | 23 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h | 6 |
4 files changed, 64 insertions, 21 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index b531f7c1e84..d70b7e3f20d 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,30 @@ +Thu May 16 15:29:33 2002 Ossama Othman <ossama@uci.edu> + + * orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp (open): + + Do not use the blocking connection strategy by default. The + fixes below obviate the need to do so. + + (make_connection): + + Updated to use the latest connection timeout features and fixes + in TAO. + + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h + (TAO_SSLIOP_BASE_CONNECTOR): + + This type is no longer an ACE_Strategy_Connector, and is now an + ACE_SSL_Strategy_Connector. The former does not handle + protocols with multiple handshakes, such as SSL, correctly. + This fixes non-blocking SSLIOP connect() problems that prevented + the use of the latest connection timeout fixes and enhancements + available in TAO. + + * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp (make_connection): + + Updated to use the latest connection timeout features and fixes + in TAO. + Wed May 15 17:38:06 2002 Priyanka Gontla <pgontla@ece.uci.edu> * docs/tutorials/Quoter/On_Demand_Activation/Makefile: diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp index c76c6a8b529..523048ac84c 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/IIOP_SSL_Connector.cpp @@ -13,7 +13,7 @@ #include "tao/Transport_Cache_Manager.h" #include "tao/Invocation.h" #include "tao/Thread_Lane_Resources.h" -#include "tao/Blocked_Connect_Strategy.h" +#include "tao/Connect_Strategy.h" #include "ace/Strategies_T.h" ACE_RCSID (TAO_SSLIOP, @@ -74,13 +74,9 @@ TAO_IIOP_SSL_Connector::open (TAO_ORB_Core *orb_core) { this->orb_core (orb_core); - // Not sure whether we should have blocked connect strategy - // here. Ossama mentions that non-blocking may not work - // properly. Keeping it as blocked till someone decides to fall in - // line with protocols like IIOP. - ACE_NEW_RETURN (this->active_connect_strategy_, - TAO_Blocked_Connect_Strategy (orb_core), - -1); + // Create our connect strategy + if (this->create_connect_strategy () == -1) + return -1; if (this->init_tcp_properties () != 0) return -1; @@ -186,8 +182,20 @@ TAO_IIOP_SSL_Connector::make_connection ( // Get the right synch options ACE_Synch_Options synch_options; - ACE_Time_Value *max_wait_time = - invocation->max_wait_time (); + ACE_Time_Value *max_wait_time = 0; + + ACE_Time_Value connection_timeout; + int timeout = 0; + + this->orb_core ()->connection_timeout (invocation->stub (), + timeout, + connection_timeout); + if (!timeout) + max_wait_time = + invocation->max_wait_time (); + else + max_wait_time = &connection_timeout; + this->active_connect_strategy_->synch_options (max_wait_time, synch_options); @@ -199,7 +207,6 @@ TAO_IIOP_SSL_Connector::make_connection ( remote_address, synch_options); - if (result == -1 && errno == EWOULDBLOCK) { result = diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp index ec475eb4abd..d2930046a40 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.cpp @@ -27,7 +27,7 @@ ACE_RCSID (TAO_SSLIOP, template class TAO_Connect_Concurrency_Strategy<TAO_SSLIOP_Connection_Handler>; template class TAO_Connect_Creation_Strategy<TAO_SSLIOP_Connection_Handler>; -template class ACE_Strategy_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR>; +template class ACE_SSL_Strategy_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR>; template class ACE_Connect_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR>; template class ACE_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR>; template class ACE_Svc_Tuple<TAO_SSLIOP_Connection_Handler>; @@ -43,7 +43,7 @@ template class ACE_Auto_Basic_Ptr<TAO_SSLIOP_Connection_Handler>; #pragma instantiate TAO_Connect_Concurrency_Strategy<TAO_SSLIOP_Connection_Handler> #pragma instantiate TAO_Connect_Creation_Strategy<TAO_SSLIOP_Connection_Handler> -#pragma instantiate ACE_Strategy_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR> +#pragma instantiate ACE_SSL_Strategy_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR> #pragma instantiate ACE_Connect_Strategy<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR> #pragma instantiate ACE_Connector<TAO_SSLIOP_Connection_Handler, ACE_SSL_SOCK_CONNECTOR> @@ -489,17 +489,27 @@ TAO_SSLIOP_Connector::ssliop_connect (TAO_SSLIOP_Endpoint *ssl_endpoint, svc_handler = safe_handler.release (); + // Get the max_wait_time + ACE_Time_Value *max_wait_time = 0; + + ACE_Time_Value connection_timeout; + int timeout = 0; + + this->orb_core ()->connection_timeout (invocation->stub (), + timeout, + connection_timeout); + if (!timeout) + max_wait_time = + invocation->max_wait_time (); + else + max_wait_time = &connection_timeout; // Get the right synch options ACE_Synch_Options synch_options; - ACE_Time_Value *max_wait_time = - invocation->max_wait_time (); - this->active_connect_strategy_->synch_options (max_wait_time, synch_options); - // We obtain the transport in the <svc_handler> variable. // As we know now that the connection is not available in // Cache we can make a new connection @@ -507,7 +517,6 @@ TAO_SSLIOP_Connector::ssliop_connect (TAO_SSLIOP_Endpoint *ssl_endpoint, remote_address, synch_options); - // We dont have to wait since we only use a blocked connect // strategy. if (result == -1 && errno == EWOULDBLOCK) diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h index 3d6175aa057..2f4cf7331f3 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Connector.h @@ -26,10 +26,10 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ #include "ace/SSL/SSL_SOCK_Connector.h" +#include "ace/SSL/SSL_Connector.h" #include "IIOP_SSL_Connector.h" #include "SSLIOP_Connection_Handler.h" - /// Forward declarations. class TAO_Base_Transport_Property; class TAO_SSLIOP_Endpoint; @@ -109,8 +109,8 @@ public: ACE_SSL_SOCK_CONNECTOR> TAO_SSLIOP_CONNECT_STRATEGY ; - typedef ACE_Strategy_Connector<TAO_SSLIOP_Connection_Handler, - ACE_SSL_SOCK_CONNECTOR> + typedef ACE_SSL_Strategy_Connector<TAO_SSLIOP_Connection_Handler, + ACE_SSL_SOCK_CONNECTOR> TAO_SSLIOP_BASE_CONNECTOR; private: |