summaryrefslogtreecommitdiff
path: root/TAO/tao/Invocation_Endpoint_Selectors.cpp
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-15 05:31:46 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-15 05:31:46 +0000
commit4ecc4a150ede487f3e80188f8960e0c2129e6ec1 (patch)
treebd20fb9f671187422a32d69e9a8702abf78e0f10 /TAO/tao/Invocation_Endpoint_Selectors.cpp
parentaa00d1acbbac61d415148d04b71d48ae72b221bf (diff)
downloadATCD-4ecc4a150ede487f3e80188f8960e0c2129e6ec1.tar.gz
ChangeLogTag:Sun Oct 15 00:11:07 2000 Marina Spivak <marina@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Invocation_Endpoint_Selectors.cpp')
-rw-r--r--TAO/tao/Invocation_Endpoint_Selectors.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/TAO/tao/Invocation_Endpoint_Selectors.cpp b/TAO/tao/Invocation_Endpoint_Selectors.cpp
index 7438cbf36e4..6f5ef669a28 100644
--- a/TAO/tao/Invocation_Endpoint_Selectors.cpp
+++ b/TAO/tao/Invocation_Endpoint_Selectors.cpp
@@ -264,9 +264,16 @@ TAO_Default_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
*invocation,
CORBA::Environment &ACE_TRY_ENV)
{
- ACE_UNUSED_ARG (ACE_TRY_ENV);
invocation->profile_ = invocation->stub_->profile_in_use ();
invocation->endpoint_ = invocation->profile_->endpoint ();
+
+ if (invocation->endpoint_ == 0)
+ {
+ // Unknown protocol - move onto the next profile.
+ this->next (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
+ this->select_endpoint (invocation, ACE_TRY_ENV);
+ }
}
void
@@ -337,7 +344,15 @@ TAO_Priority_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
// Select an endpoint from the profile.
- if (invocation->profile_->endpoint_count () == 1)
+ if (invocation->profile_->endpoint_count () == 0)
+ {
+ // Unknown protocol - move onto the next profile.
+ this->next (invocation, ACE_TRY_ENV);
+ ACE_CHECK;
+ this->select_endpoint (invocation, ACE_TRY_ENV);
+ }
+
+ else if (invocation->profile_->endpoint_count () == 1)
{
// Profile contains just one endpoint. This happens when:
// a) we are talking to a nonTAO server (which doesn't have
@@ -454,10 +469,12 @@ TAO_Protocol_Endpoint_Selector::select_endpoint (TAO_GIOP_Invocation
}
}
- if (profile == 0)
+ if (profile == 0
+ || profile->endpoint_count () == 0)
{
- // If no Profile for the protocol of interest were found,
- // try another protocol.
+ // If either no profile for the protocol of interest were found
+ // or profile was found but client ORB doesn't understand the
+ // protocol, try another protocol.
invocation->endpoint_selection_state_.client_protocol_index_++;
this->select_endpoint (invocation, ACE_TRY_ENV);
}