summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObjectAdapterI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterI.cpp')
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 37a6d6bd10e..38488430104 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -315,7 +315,7 @@ Ice::ObjectAdapterI::ObjectAdapterI(const InstancePtr& instance, const string& n
// might change it, for example, to fill in the real port
// number if a zero port number is given.
//
- EndpointPtr endp = Endpoint::endpointFromString(es);
+ EndpointPtr endp = Endpoint::endpointFromString(instance, es);
_collectorFactories.push_back(new CollectorFactory(instance, this, endp));
if (end == s.length())
@@ -364,17 +364,7 @@ Ice::ObjectAdapterI::newProxy(const Identity& ident)
transform(_collectorFactories.begin(), _collectorFactories.end(), back_inserter(endpoints),
Ice::constMemFun(&CollectorFactory::endpoint));
- // TODO: This is a bandaid, and should be replaced by a better approach.
- bool makeSecure = false;
- size_t numSecureEndpoints = count_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&Endpoint::secure));
-
- if (numSecureEndpoints >= endpoints.size())
- {
- makeSecure = true;
- }
-
- ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, makeSecure /* false */,
- endpoints, endpoints);
+ ReferencePtr reference = new Reference(_instance, ident, "", Reference::ModeTwoway, false, endpoints, endpoints);
return _instance->proxyFactory()->referenceToProxy(reference);
}