summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/.depend4
-rw-r--r--cpp/src/Ice/Endpoint.cpp47
-rw-r--r--cpp/src/Ice/Instance.cpp14
-rw-r--r--cpp/src/Ice/Instance.h2
-rw-r--r--cpp/src/IcePack/Client.cpp9
5 files changed, 25 insertions, 51 deletions
diff --git a/cpp/src/Ice/.depend b/cpp/src/Ice/.depend
index c88f7fca2da..d54e3096d13 100644
--- a/cpp/src/Ice/.depend
+++ b/cpp/src/Ice/.depend
@@ -11,7 +11,7 @@ BasicStream.o: BasicStream.cpp ../../include/Ice/BasicStream.h ../../include/Ice
SysLoggerI.o: SysLoggerI.cpp ../Ice/SysLoggerI.h ../../include/Ice/Logger.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h
TraceLevels.o: TraceLevels.cpp ../Ice/TraceLevels.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../Ice/TraceLevelsF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/Properties.h
TraceUtil.o: TraceUtil.cpp ../Ice/TraceUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../Ice/TraceLevelsF.h ../Ice/Instance.h ../../include/Ice/InstanceF.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/Object.h ../../include/Ice/Proxy.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../Ice/TraceLevels.h ../../include/Ice/Logger.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../Ice/Protocol.h ../../include/Ice/IdentityUtil.h
-Instance.o: Instance.cpp ../Ice/Instance.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/InstanceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/PropertiesF.h ../../include/Ice/LoggerF.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/TraceLevels.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/Emitter.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/EndpointF.h ../Ice/EventHandler.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../Ice/ObjectFactoryManager.h ../../include/Ice/ObjectFactoryF.h ../Ice/UserExceptionFactoryManager.h ../../include/Ice/UserExceptionFactoryF.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../../include/Ice/Properties.h ../Ice/LoggerI.h ../../include/Ice/Logger.h ../Ice/SysLoggerI.h
+Instance.o: Instance.cpp ../Ice/Instance.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/InstanceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/PropertiesF.h ../../include/Ice/LoggerF.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/TraceLevels.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/Emitter.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/EndpointF.h ../Ice/EventHandler.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../Ice/ObjectFactoryManager.h ../../include/Ice/ObjectFactoryF.h ../Ice/UserExceptionFactoryManager.h ../../include/Ice/UserExceptionFactoryF.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../../include/Ice/Properties.h ../Ice/LoggerI.h ../../include/Ice/Logger.h ../Ice/Network.h ../Ice/SysLoggerI.h
Communicator.o: Communicator.cpp ../../include/Ice/Communicator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/PropertiesF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
CommunicatorI.o: CommunicatorI.cpp ../Ice/CommunicatorI.h ../Ice/ThreadPoolF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/Communicator.h ../../include/Ice/LoggerF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/StreamF.h ../Ice/PropertiesI.h ../../include/Ice/Properties.h ../Ice/Instance.h ../Ice/TraceLevelsF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h ../Ice/ProxyFactory.h ../../include/Ice/ReferenceF.h ../Ice/ThreadPool.h ../Ice/EventHandlerF.h ../Ice/ObjectFactoryManager.h ../Ice/UserExceptionFactoryManager.h ../Ice/ObjectAdapterFactory.h ../Ice/ObjectAdapterI.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/Identity.h ../../include/Ice/CollectorF.h ../Ice/EndpointF.h ../../include/Ice/Logger.h ../Ice/StreamI.h ../../include/Ice/Stream.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h
ObjectFactory.o: ObjectFactory.cpp ../../include/Ice/ObjectFactory.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
@@ -22,7 +22,7 @@ ObjectAdapterFactory.o: ObjectAdapterFactory.cpp ../Ice/ObjectAdapterFactory.h .
ServantLocator.o: ServantLocator.cpp ../../include/Ice/ServantLocator.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Object.h
UserExceptionFactory.o: UserExceptionFactory.cpp ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Object.h
UserExceptionFactoryManager.o: UserExceptionFactoryManager.cpp ../Ice/UserExceptionFactoryManager.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h
-Endpoint.o: Endpoint.cpp ../Ice/Endpoint.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../Ice/EndpointF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/InstanceF.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/AcceptorF.h ../Ice/Network.h ../Ice/TcpAcceptor.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../Ice/Acceptor.h ../Ice/TcpConnector.h ../Ice/Connector.h ../Ice/TcpTransceiver.h ../Ice/Transceiver.h ../Ice/SslAcceptor.h ../Ice/SslConnector.h ../Ice/SslTransceiver.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../Ice/TraceLevels.h ../../include/Ice/PropertiesF.h ../../include/Ice/Logger.h ../Ice/UdpTransceiver.h ../../include/Ice/BasicStream.h
+Endpoint.o: Endpoint.cpp ../Ice/Endpoint.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../Ice/EndpointF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/InstanceF.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/AcceptorF.h ../Ice/Network.h ../Ice/TcpAcceptor.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../Ice/Acceptor.h ../Ice/TcpConnector.h ../Ice/Connector.h ../Ice/TcpTransceiver.h ../Ice/Transceiver.h ../Ice/SslAcceptor.h ../Ice/SslConnector.h ../Ice/SslTransceiver.h ../Ice/SslConnection.h ../../include/Ice/Buffer.h ../Ice/TraceLevels.h ../../include/Ice/PropertiesF.h ../../include/Ice/Logger.h ../Ice/UdpTransceiver.h ../../include/Ice/BasicStream.h ../Ice/Instance.h ../../include/Ice/CommunicatorF.h ../../include/Ice/ProxyFactoryF.h ../Ice/ThreadPoolF.h ../../include/Ice/EmitterF.h ../Ice/ObjectFactoryManagerF.h ../Ice/UserExceptionFactoryManagerF.h ../../include/Ice/ObjectAdapterFactoryF.h
Reference.o: Reference.cpp ../Ice/Reference.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/ReferenceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../Ice/EndpointF.h ../../include/Ice/InstanceF.h ../../include/Ice/Identity.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../Ice/Endpoint.h ../Ice/TransceiverF.h ../Ice/ConnectorF.h ../Ice/AcceptorF.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/IdentityUtil.h
Identity.o: Identity.cpp ../../include/Ice/Identity.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/Proxy.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/EmitterF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Object.h
IdentityUtil.o: IdentityUtil.cpp ../../include/Ice/IdentityUtil.h ../../include/Ice/Identity.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ObjectF.h ../../include/Ice/Handle.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h
diff --git a/cpp/src/Ice/Endpoint.cpp b/cpp/src/Ice/Endpoint.cpp
index a5677a81376..ad3590e9645 100644
--- a/cpp/src/Ice/Endpoint.cpp
+++ b/cpp/src/Ice/Endpoint.cpp
@@ -340,8 +340,7 @@ IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string&
if (_host.empty())
{
- // TODO: Whether numeric or not should be configurable
- const_cast<string&>(_host) = getLocalHost(true);
+ const_cast<string&>(_host) = _instance->defaultHost();
}
}
@@ -372,19 +371,7 @@ string
IceInternal::TcpEndpoint::toString() const
{
ostringstream s;
- s << "tcp";
- if (_host != getLocalHost(true)) // TODO: Whether numeric or not should be configurable
- {
- s << " -h " << _host;
- }
- if (_port != 0)
- {
- s << " -p " << _port;
- }
- if (_timeout != -1)
- {
- s << " -t " << _timeout;
- }
+ s << "tcp -h " << _host << " -p " << _port << " -t " << _timeout;
return s.str();
}
@@ -655,8 +642,7 @@ IceInternal::SslEndpoint::SslEndpoint(const InstancePtr& instance, const string&
if (_host.empty())
{
- // TODO: Whether numeric or not should be configurable
- const_cast<string&>(_host) = getLocalHost(true);
+ const_cast<string&>(_host) = _instance->defaultHost();
}
}
@@ -687,19 +673,7 @@ string
IceInternal::SslEndpoint::toString() const
{
ostringstream s;
- s << "ssl";
- if (_host != getLocalHost(true)) // TODO: Whether numeric or not should be configurable
- {
- s << " -h " << _host;
- }
- if (_port != 0)
- {
- s << " -p " << _port;
- }
- if (_timeout != -1)
- {
- s << " -t " << _timeout;
- }
+ s << "ssl -h " << _host << " -p " << _port << " -t " << _timeout;
return s.str();
}
@@ -962,8 +936,7 @@ IceInternal::UdpEndpoint::UdpEndpoint(const InstancePtr& instance, const string&
if (_host.empty())
{
- // TODO: Whether numeric or not should be configurable
- const_cast<string&>(_host) = getLocalHost(true);
+ const_cast<string&>(_host) = _instance->defaultHost();
}
}
@@ -991,15 +964,7 @@ string
IceInternal::UdpEndpoint::toString() const
{
ostringstream s;
- s << "udp";
- if (_host != getLocalHost(true)) // TODO: Whether numeric or not should be configurable
- {
- s << " -h " << _host;
- }
- if (_port != 0)
- {
- s << " -p " << _port;
- }
+ s << "udp -h " << _host << " -p " << _port;
return s.str();
}
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 4740a822b3c..f0b2b1a9773 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -19,6 +19,7 @@
#include <Ice/Exception.h>
#include <Ice/Properties.h>
#include <Ice/LoggerI.h>
+#include <Ice/Network.h>
#ifndef WIN32
# include <Ice/SysLoggerI.h>
@@ -149,6 +150,14 @@ IceInternal::Instance::defaultProtocol()
return _defaultProtocol;
}
+string
+IceInternal::Instance::defaultHost()
+{
+ // No synchronization necessary
+ // JTCSyncT<JTCMutex> sync(*this);
+ return _defaultHost;
+}
+
IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const PropertiesPtr& properties) :
_communicator(communicator),
_properties(properties)
@@ -269,6 +278,11 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Prope
{
_defaultProtocol = "tcp";
}
+ _defaultHost = _properties->getProperty("Ice.DefaultHost");
+ if (_defaultHost.empty())
+ {
+ _defaultHost = getLocalHost(true);
+ }
}
catch(...)
{
diff --git a/cpp/src/Ice/Instance.h b/cpp/src/Ice/Instance.h
index 76b98602794..2efba40c547 100644
--- a/cpp/src/Ice/Instance.h
+++ b/cpp/src/Ice/Instance.h
@@ -51,6 +51,7 @@ public:
ObjectAdapterFactoryPtr objectAdapterFactory();
ThreadPoolPtr threadPool();
std::string defaultProtocol();
+ std::string defaultHost();
private:
@@ -70,6 +71,7 @@ private:
ObjectAdapterFactoryPtr _objectAdapterFactory;
ThreadPoolPtr _threadPool;
std::string _defaultProtocol;
+ std::string _defaultHost;
//
// Global state management
diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp
index eeaf74e3001..5f4e7eb7d20 100644
--- a/cpp/src/IcePack/Client.cpp
+++ b/cpp/src/IcePack/Client.cpp
@@ -145,14 +145,7 @@ Client::run(int argc, char* argv[])
return EXIT_FAILURE;
}
- string protocol = properties->getProperty("Ice.Protocol");
- string secureFlag;
- if (!protocol.compare("ssl"))
- {
- secureFlag = " -s ";
- }
-
- Ice::ObjectPrx base = communicator()->stringToProxy("admin" + secureFlag + ":" + adminEndpoints);
+ Ice::ObjectPrx base = communicator()->stringToProxy("admin:" + adminEndpoints);
AdminPrx admin = AdminPrx::checkedCast(base);
if (!admin)
{