summaryrefslogtreecommitdiff
path: root/TAO/tao/Invocation_Endpoint_Selectors.cpp
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2004-08-09 11:53:16 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2004-08-09 11:53:16 +0000
commit5eab0611201c153800002942b0bd5d06743085a5 (patch)
tree9db9c40b62eb2bf93e31f5fbf3a479f450148a10 /TAO/tao/Invocation_Endpoint_Selectors.cpp
parent659b1d7d4d4d401cff367f8d6e53f07eaf75057a (diff)
downloadATCD-5eab0611201c153800002942b0bd5d06743085a5.tar.gz
ChangeLogTag: Mon Aug 9 11:51:12 UTC 2004 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/Invocation_Endpoint_Selectors.cpp')
-rw-r--r--TAO/tao/Invocation_Endpoint_Selectors.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/TAO/tao/Invocation_Endpoint_Selectors.cpp b/TAO/tao/Invocation_Endpoint_Selectors.cpp
index 14ce667c411..6324aea5378 100644
--- a/TAO/tao/Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/Invocation_Endpoint_Selectors.cpp
@@ -43,28 +43,34 @@ TAO_Default_Endpoint_Selector::select_endpoint (
{
r->profile (r->stub ()->profile_in_use ());
- const size_t endpoint_count =
- r->profile ()->endpoint_count ();
-
- TAO_Endpoint *ep =
- r->profile ()->endpoint ();
-
- for (size_t i = 0; i < endpoint_count; ++i)
+ // Check whether we need to have do a blocked wait or we have a non
+ // blocked wait and we support that, if this is not the case we
+ // can't use this profile and try the next
+ if (r->blocked () ||
+ (!r->blocked () && r->profile ()->supports_non_blocking_oneways ()))
{
- TAO_Base_Transport_Property desc (ep);
+ const size_t endpoint_count =
+ r->profile ()->endpoint_count ();
+
+ TAO_Endpoint *ep =
+ r->profile ()->endpoint ();
- bool retval =
- r->try_connect (&desc,
- max_wait_time
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ for (size_t i = 0; i < endpoint_count; ++i)
+ {
+ TAO_Base_Transport_Property desc (ep);
+ bool retval =
+ r->try_connect (&desc,
+ max_wait_time
+ ACE_ENV_ARG_PARAMETER);
+ ACE_CHECK;
- // Check if the connect has completed.
- if (retval)
- return;
+ // Check if the connect has completed.
+ if (retval)
+ return;
- // Go to the next endpoint in this profile.
- ep = ep->next ();
+ // Go to the next endpoint in this profile.
+ ep = ep->next ();
+ }
}
}
while (r->stub ()->next_profile_retry () != 0);