summaryrefslogtreecommitdiff
path: root/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp
diff options
context:
space:
mode:
authorbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-10-02 03:26:36 +0000
committerbala <bala@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2004-10-02 03:26:36 +0000
commit9bca10f9230e87e2bad53fb8cafc6b737897d2f9 (patch)
treec3138cde4fdaa233c90b760a2ffcd339a7e1ac31 /TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp
parent1280f2e2a447693c9a4aae79a4467078daaf96f1 (diff)
downloadATCD-9bca10f9230e87e2bad53fb8cafc6b737897d2f9.tar.gz
ChangeLogTag:Sat Oct 2 03:24:26 2004 Balachandran Natarajan <bala@dre.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp')
-rw-r--r--TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp34
1 files changed, 25 insertions, 9 deletions
diff --git a/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp b/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp
index 99e8511844b..55cc453c1d8 100644
--- a/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp
+++ b/TAO/tao/Messaging/Connection_Timeout_Policy_i.cpp
@@ -56,18 +56,34 @@ TAO_ConnectionTimeoutPolicy::hook (TAO_ORB_Core *orb_core,
bool &has_timeout,
ACE_Time_Value &time_value)
{
- CORBA::Policy_var policy =
- (stub == 0
- ? orb_core->get_cached_policy_including_current (TAO_CACHED_POLICY_CONNECTION_TIMEOUT)
- : stub->get_cached_policy (TAO_CACHED_POLICY_CONNECTION_TIMEOUT));
- if (CORBA::is_nil (policy.in ()))
- {
- has_timeout = 0;
- return;
- }
ACE_TRY_NEW_ENV
{
+ CORBA::Policy_var policy = 0;
+
+ if (stub == 0)
+ {
+ policy =
+ orb_core->get_cached_policy_including_current (
+ TAO_CACHED_POLICY_CONNECTION_TIMEOUT
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+ else
+ {
+ policy =
+ stub->get_cached_policy (
+ TAO_CACHED_POLICY_CONNECTION_TIMEOUT
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+ }
+
+ if (CORBA::is_nil (policy.in ()))
+ {
+ has_timeout = 0;
+ return;
+ }
+
TAO::ConnectionTimeoutPolicy_var p =
TAO::ConnectionTimeoutPolicy::_narrow (
policy.in ()