summaryrefslogtreecommitdiff
path: root/TAO/tao/Invocation_Endpoint_Selectors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Invocation_Endpoint_Selectors.cpp')
-rw-r--r--TAO/tao/Invocation_Endpoint_Selectors.cpp41
1 files changed, 15 insertions, 26 deletions
diff --git a/TAO/tao/Invocation_Endpoint_Selectors.cpp b/TAO/tao/Invocation_Endpoint_Selectors.cpp
index b8b07ed3df0..fafe05a84aa 100644
--- a/TAO/tao/Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/Invocation_Endpoint_Selectors.cpp
@@ -1,4 +1,4 @@
-// -*- C++ -*-
+// $Id$
#include "tao/Invocation_Endpoint_Selectors.h"
@@ -12,10 +12,7 @@
#include "tao/Endpoint.h"
#include "tao/Base_Transport_Property.h"
-ACE_RCSID (tao,
- Invocation_Endpoint_Selectors,
- "$Id$")
-
+ACE_RCSID(tao, Invocation_Endpoint_Selectors, "$Id$")
TAO_Invocation_Endpoint_Selector::~TAO_Invocation_Endpoint_Selector (void)
{
@@ -28,34 +25,26 @@ TAO_Default_Endpoint_Selector::~TAO_Default_Endpoint_Selector (void)
}
void
-TAO_Default_Endpoint_Selector::select_endpoint (
- TAO_GIOP_Invocation *invocation,
- CORBA::Environment &ACE_TRY_ENV)
+TAO_Default_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation *invocation,
+ CORBA::Environment &ACE_TRY_ENV)
{
do
{
invocation->profile (invocation->stub ()->profile_in_use ());
invocation->endpoint (invocation->profile ()->endpoint ());
- size_t endpoint_count = invocation->profile ()->endpoint_count();
- for (size_t i = 0; i < endpoint_count; ++i)
+ // If known endpoint, select it.
+ if (invocation->endpoint () != 0)
{
- // If known endpoint, select it.
- if (invocation->endpoint () != 0)
- {
- TAO_Base_Transport_Property desc (invocation->endpoint ());
-
- int status =
- invocation->perform_call (desc, ACE_TRY_ENV);
- ACE_CHECK;
-
- // Check if the invocation has completed.
- if (status == 1)
- return;
-
- // Go to the next endpoint in this profile.
- invocation->endpoint (invocation->endpoint()->next());
- }
+ TAO_Base_Transport_Property default_desc (invocation->endpoint ());
+
+ int status =
+ invocation->perform_call (default_desc, ACE_TRY_ENV);
+ ACE_CHECK;
+
+ // Check if the invocation has completed.
+ if (status == 1)
+ return;
}
}
while (invocation->stub ()->next_profile_retry () != 0);