summaryrefslogtreecommitdiff
path: root/TAO/tao/Strategies/UIOP_Connector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Strategies/UIOP_Connector.cpp')
-rw-r--r--TAO/tao/Strategies/UIOP_Connector.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/TAO/tao/Strategies/UIOP_Connector.cpp b/TAO/tao/Strategies/UIOP_Connector.cpp
index 77279113a86..cc594d87c81 100644
--- a/TAO/tao/Strategies/UIOP_Connector.cpp
+++ b/TAO/tao/Strategies/UIOP_Connector.cpp
@@ -121,7 +121,6 @@ TAO_UIOP_Connector::make_connect (TAO_GIOP_Invocation *invocation,
ACE_TEXT ("TAO (%P|%t) Connector::connect - ")
ACE_TEXT ("looking for UIOP connection.\n")));
- TAO_Transport *&transport = invocation->transport ();
ACE_Time_Value *max_wait_time = invocation->max_wait_time ();
TAO_Endpoint *endpoint = desc->endpoint ();
@@ -147,7 +146,6 @@ TAO_UIOP_Connector::make_connect (TAO_GIOP_Invocation *invocation,
int result = 0;
TAO_UIOP_Connection_Handler *svc_handler = 0;
- TAO_Transport *base_transport = 0;
if (TAO_debug_level > 2)
ACE_DEBUG ((LM_DEBUG,
@@ -199,7 +197,9 @@ TAO_UIOP_Connector::make_connect (TAO_GIOP_Invocation *invocation,
return -1;
}
- base_transport = TAO_Transport::_duplicate (svc_handler->transport ());
+ TAO_Transport *base_transport =
+ TAO_Transport::_duplicate (svc_handler->transport ());
+
// Add the handler to Cache
int retval =
this->orb_core ()->lane_resources ().transport_cache ().cache_transport (desc,
@@ -212,8 +212,19 @@ TAO_UIOP_Connector::make_connect (TAO_GIOP_Invocation *invocation,
ACE_TEXT ("could not add the new connection to Cache \n")));
}
- // No need to _duplicate and release since base_transport
- // is going out of scope. transport now has control of base_transport.
+ // If the wait strategy wants us to be registered with the reactor
+ // then we do so.
+ retval = base_transport->wait_strategy ()->register_handler ();
+
+ if (retval != 0 && TAO_debug_level > 0)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_LIB_TEXT ("(%P|%t) IIOP_Connector::connect ")
+ ACE_LIB_TEXT ("could not add the new connection to reactor \n")));
+ }
+
+ // Handover the transport pointer to the Invocation class.
+ TAO_Transport *&transport = invocation->transport ();
transport = base_transport;
return 0;