From 551f6ce11e2c94772209b13e0e5c8230fc2c50d3 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Tue, 21 Nov 2006 17:13:19 +0000 Subject: Added Ice.Default.PreferSecure --- cpp/src/Ice/ReferenceFactory.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'cpp/src/Ice/ReferenceFactory.cpp') diff --git a/cpp/src/Ice/ReferenceFactory.cpp b/cpp/src/Ice/ReferenceFactory.cpp index 6b720ec6321..39770b2de32 100644 --- a/cpp/src/Ice/ReferenceFactory.cpp +++ b/cpp/src/Ice/ReferenceFactory.cpp @@ -53,6 +53,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, const string& facet, Reference::Mode mode, bool secure, + bool preferSecure, const vector& endpoints, const RouterInfoPtr& routerInfo, bool collocationOptimization) @@ -72,7 +73,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, // // Create new reference // - return new DirectReference(_instance, _communicator, ident, context, facet, mode, secure, + return new DirectReference(_instance, _communicator, ident, context, facet, mode, secure, preferSecure, endpoints, routerInfo, collocationOptimization); } @@ -82,6 +83,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, const string& facet, Reference::Mode mode, bool secure, + bool preferSecure, const string& adapterId, const RouterInfoPtr& routerInfo, const LocatorInfoPtr& locatorInfo, @@ -103,7 +105,7 @@ IceInternal::ReferenceFactory::create(const Identity& ident, // // Create new reference // - return new IndirectReference(_instance, _communicator, ident, context, facet, mode, secure, + return new IndirectReference(_instance, _communicator, ident, context, facet, mode, secure, preferSecure, adapterId, routerInfo, locatorInfo, collocationOptimization, locatorCacheTimeout); } @@ -417,7 +419,8 @@ IceInternal::ReferenceFactory::create(const string& str) if(beg == string::npos) { - return create(ident, _instance->getDefaultContext(), facet, mode, secure, "", routerInfo, + return create(ident, _instance->getDefaultContext(), facet, mode, secure, + _instance->defaultsAndOverrides()->defaultPreferSecure, "", routerInfo, locatorInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization, _instance->defaultsAndOverrides()->defaultLocatorCacheTimeout); } @@ -471,8 +474,9 @@ IceInternal::ReferenceFactory::create(const string& str) } } - return create(ident, _instance->getDefaultContext(), facet, mode, secure, endpoints, - routerInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization); + return create(ident, _instance->getDefaultContext(), facet, mode, secure, + _instance->defaultsAndOverrides()->defaultPreferSecure, endpoints, routerInfo, + _instance->defaultsAndOverrides()->defaultCollocationOptimization); break; } case '@': @@ -522,8 +526,9 @@ IceInternal::ReferenceFactory::create(const string& str) adapter = tmpAdapter; } - return create(ident, _instance->getDefaultContext(), facet, mode, secure, adapter, - routerInfo, locatorInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization, + return create(ident, _instance->getDefaultContext(), facet, mode, secure, + _instance->defaultsAndOverrides()->defaultPreferSecure, adapter, routerInfo, locatorInfo, + _instance->defaultsAndOverrides()->defaultCollocationOptimization, _instance->defaultsAndOverrides()->defaultLocatorCacheTimeout); break; } @@ -594,14 +599,16 @@ IceInternal::ReferenceFactory::create(const Identity& ident, BasicStream* s) EndpointIPtr endpoint = _instance->endpointFactoryManager()->read(s); endpoints.push_back(endpoint); } - return create(ident, _instance->getDefaultContext(), facet, mode, secure, endpoints, - routerInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization); + return create(ident, _instance->getDefaultContext(), facet, mode, secure, + _instance->defaultsAndOverrides()->defaultPreferSecure, endpoints, routerInfo, + _instance->defaultsAndOverrides()->defaultCollocationOptimization); } else { s->read(adapterId); - return create(ident, _instance->getDefaultContext(), facet, mode, secure, adapterId, - routerInfo, locatorInfo, _instance->defaultsAndOverrides()->defaultCollocationOptimization, + return create(ident, _instance->getDefaultContext(), facet, mode, secure, + _instance->defaultsAndOverrides()->defaultPreferSecure, adapterId, routerInfo, locatorInfo, + _instance->defaultsAndOverrides()->defaultCollocationOptimization, _instance->defaultsAndOverrides()->defaultLocatorCacheTimeout); } } -- cgit v1.2.3