summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Reference.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2006-09-11 08:33:10 +0000
committerMatthew Newhook <matthew@zeroc.com>2006-09-11 08:33:10 +0000
commit880d8bf4b6c4764467c3cdfbac5b48633a04e0b8 (patch)
tree880e74e1d68f2187fae80a42c0257fdd22e9b933 /cpp/src/Ice/Reference.cpp
parentfile TestI.h was initially added on branch twoThreadsPerConnection. (diff)
downloadice-880d8bf4b6c4764467c3cdfbac5b48633a04e0b8.tar.bz2
ice-880d8bf4b6c4764467c3cdfbac5b48633a04e0b8.tar.xz
ice-880d8bf4b6c4764467c3cdfbac5b48633a04e0b8.zip
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1289
Diffstat (limited to 'cpp/src/Ice/Reference.cpp')
-rw-r--r--cpp/src/Ice/Reference.cpp28
1 files changed, 16 insertions, 12 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index dffa814cee1..8c1c0f80c6e 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -668,12 +668,14 @@ IceInternal::FixedReference::filterConnections(const vector<ConnectionIPtr>& all
random_shuffle(connections.begin(), connections.end(), rng);
//
- // If a secure connection is requested, remove all non-secure
- // connections. Otherwise make non-secure connections preferred over
- // secure connections by partitioning the connection vector, so that
- // non-secure connections come first.
+ // If a secure connection is requested or secure overrides is set,
+ // remove all non-secure connections. Otherwise make non-secure
+ // connections preferred over secure connections by partitioning
+ // the connection vector, so that non-secure connections come
+ // first.
//
- if(getSecure())
+ DefaultsAndOverridesPtr overrides = getInstance()->defaultsAndOverrides();
+ if(getSecure() || (overrides->overrideSecure && overrides->overrideSecureValue))
{
connections.erase(remove_if(connections.begin(), connections.end(), not1(ConnectionIsSecure())),
connections.end());
@@ -989,8 +991,9 @@ IceInternal::RoutableReference::operator<(const Reference& r) const
}
IceInternal::RoutableReference::RoutableReference(const InstancePtr& inst, const CommunicatorPtr& com,
- const Identity& ident, const SharedContextPtr& ctx, const string& fs, Mode md,
- bool sec, const RouterInfoPtr& rtrInfo, bool collocationOpt) :
+ const Identity& ident, const SharedContextPtr& ctx, const string& fs,
+ Mode md, bool sec, const RouterInfoPtr& rtrInfo,
+ bool collocationOpt) :
Reference(inst, com, ident, ctx, fs, md),
_secure(sec),
_routerInfo(rtrInfo),
@@ -1084,12 +1087,13 @@ IceInternal::RoutableReference::createConnection(const vector<EndpointIPtr>& all
}
//
- // If a secure connection is requested, remove all non-secure
- // endpoints. Otherwise make non-secure endpoints preferred over
- // secure endpoints by partitioning the endpoint vector, so that
- // non-secure endpoints come first.
+ // If a secure connection is requested or secure overrides is set,
+ // remove all non-secure endpoints. Otherwise make non-secure
+ // endpoints preferred over secure endpoints by partitioning the
+ // endpoint vector, so that non-secure endpoints come first.
//
- if(getSecure())
+ DefaultsAndOverridesPtr overrides = getInstance()->defaultsAndOverrides();
+ if(getSecure() || (overrides->overrideSecure && overrides->overrideSecureValue))
{
endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), not1(Ice::constMemFun(&EndpointI::secure))),
endpoints.end());