diff options
author | Marc Laukien <marc@zeroc.com> | 2001-12-06 20:50:34 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-12-06 20:50:34 +0000 |
commit | 69ab9df0b58233ca893407b0ef9fae5376413c06 (patch) | |
tree | 6806c4360e50f519a6cf085e78ad81c503bba932 | |
parent | default protocol (diff) | |
download | ice-69ab9df0b58233ca893407b0ef9fae5376413c06.tar.bz2 ice-69ab9df0b58233ca893407b0ef9fae5376413c06.tar.xz ice-69ab9df0b58233ca893407b0ef9fae5376413c06.zip |
Ice.DefaultHost, Ice.DefaultProtocol
34 files changed, 137 insertions, 380 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py index 3f9c13fe692..b5e1dcbe44b 100644 --- a/cpp/config/TestUtil.py +++ b/cpp/config/TestUtil.py @@ -11,23 +11,48 @@ import sys, os -protocol = "tcp" +# +# Set protocol to "ssl" in case you want to run the tests with the SSL protocol. Otherwise TCP is used. +# -serverOptions = \ -" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30" + \ -" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=server_sslconfig.xml" + \ -" --Ice.Protocol=" + protocol +protocol = "ssl" +#protocol = "" -clientOptions = \ -" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=client_sslconfig.xml" + \ -" --Ice.Protocol=" + protocol +# +# Set the host to the hostname the server is running. If not set, "localhost" is used. +# -clientServerOptions = \ -" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30" + \ -" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml --Ice.Protocol=" + protocol +#host = "someotherhost" +host = "" + +# +# Don't change anything below this line +# -collocatedOptions = \ -" --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml --Ice.Protocol=" + protocol +if protocol == "ssl": + clientProtocol = " --Ice.DefaultProtocol=ssl" + \ + " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=client_sslconfig.xml" + serverProtocol = " --Ice.DefaultProtocol=ssl" + \ + " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=server_sslconfig.xml" + clientServerProtocol = " --Ice.DefaultProtocol=ssl" + \ + " --Ice.Security.Ssl.CertPath=TOPLEVELDIR/certs --Ice.Security.Ssl.Config=sslconfig.xml" +else: + clientProtocol = "" + serverProtocol = "" + clientServerProtocol = "" + +if host != "": + defaultHost = " --Ice.DefaultHost=" + host +else: + defaultHost = "" + +commonServerOptions = \ +" --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.WarnAboutServerExceptions --Ice.ServerIdleTime=30" + +serverOptions = commonServerOptions + serverProtocol +clientOptions = clientProtocol + defaultHost +clientServerOptions = commonServerOptions + clientServerProtocol + defaultHost +collocatedOptions = clientServerProtocol serverPids = [] diff --git a/cpp/demo/IceStorm/clock/Clock.ice b/cpp/demo/IceStorm/clock/Clock.ice index 343c4458869..ed7d7fac5a8 100644 --- a/cpp/demo/IceStorm/clock/Clock.ice +++ b/cpp/demo/IceStorm/clock/Clock.ice @@ -13,7 +13,7 @@ interface Clock { - void tick(); + void tick(); }; -#endif
\ No newline at end of file +#endif diff --git a/cpp/doc/Properties.sgml b/cpp/doc/Properties.sgml index 3dfba2a305b..92203108c6c 100644 --- a/cpp/doc/Properties.sgml +++ b/cpp/doc/Properties.sgml @@ -490,6 +490,45 @@ cross-reference TODO: Move to some place more appropriate </section> <!-- ********************************************************************** --> +<section><title>Protocol</title> +<!-- ********************************************************************** --> + +<section><title>Ice.DefaultProtocol</title> +<section><title>Synopsis</title> +<synopsis> +Ice.DefaultProtocol=<replaceable>protocol</replaceable> +</synopsis> +</section> +<section> +<title>Description</title> +<para> +Sets the protocol that is being used if an endpoint uses +<literal>default</literal> as protocol specification. The default +value is <literal>tcp</literal>. +</para> +</section> +</section> + +<section><title>Ice.DefaultHost</title> +<section><title>Synopsis</title> +<synopsis> +Ice.DefaultHost=<replaceable>host</replaceable> +</synopsis> +</section> +<section> +<title>Description</title> +<para> +If an endpoint is specified without a host name (i.e., without a +<literal>-h <replaceable>host</replaceable></literal> option), the +<replaceable>host</replaceable> value from this property is being used +instead. The default value is the local host name. +</para> +</section> +</section> + +</section> + +<!-- ********************************************************************** --> <section><title>Miscellaneous</title> <!-- ********************************************************************** --> @@ -621,4 +660,3 @@ dispatching operation calls invoked by clients. </section> </section> - diff --git a/cpp/doc/ReferencesEndpoints.sgml b/cpp/doc/ReferencesEndpoints.sgml index f8ff1a73472..524dc99fde8 100644 --- a/cpp/doc/ReferencesEndpoints.sgml +++ b/cpp/doc/ReferencesEndpoints.sgml @@ -74,15 +74,14 @@ TBD </section> <!-- ********************************************************************** --> -<section><title>SSL Endpoint</title> +<section><title>UDP/IP Endpoint</title> <!-- ********************************************************************** --> <section><title>Synopsis</title> <cmdsynopsis> -<command>ssl</command> +<command>udp</command> <arg>-h <replaceable>host</replaceable></arg> <arg>-p <replaceable>port</replaceable></arg> -<arg>-t <replaceable>timeout</replaceable></arg> </cmdsynopsis> </section> @@ -95,14 +94,15 @@ TBD </section> <!-- ********************************************************************** --> -<section><title>UDP/IP Endpoint</title> +<section><title>SSL Endpoint</title> <!-- ********************************************************************** --> <section><title>Synopsis</title> <cmdsynopsis> -<command>udp</command> +<command>ssl</command> <arg>-h <replaceable>host</replaceable></arg> <arg>-p <replaceable>port</replaceable></arg> +<arg>-t <replaceable>timeout</replaceable></arg> </cmdsynopsis> </section> 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) { diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index bd2b65646f1..343430d3b57 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -49,27 +49,7 @@ ThrowerPrx allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { cout << "testing stringToProxy... " << flush; - string ref; - - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - string secure; - - if (protocol.empty()) - { - protocol = "tcp"; - } - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - - string endpts = protocol + " -p 12345 -t 2000"; - - ref = "thrower" + secure + ":" + endpts; - + string ref = "thrower:default -p 12345 -t 2000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp index c8486e3857a..cb2be202a7d 100644 --- a/cpp/test/Ice/exceptions/Collocated.cpp +++ b/cpp/test/Ice/exceptions/Collocated.cpp @@ -16,16 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new ThrowerI(adapter); adapter->add(object, Ice::stringToIdentity("thrower")); diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp index 86fdbda3c76..2372531fd5c 100644 --- a/cpp/test/Ice/exceptions/Server.cpp +++ b/cpp/test/Ice/exceptions/Server.cpp @@ -17,16 +17,8 @@ int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - properties->setProperty("Ice.WarnAboutServerExceptions", "0"); - string endpts = protocol + " -p 12345 -t 2000"; + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new ThrowerI(adapter); adapter->add(object, Ice::stringToIdentity("thrower")); diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp index e9d7076be60..845e462a417 100644 --- a/cpp/test/Ice/facets/AllTests.cpp +++ b/cpp/test/Ice/facets/AllTests.cpp @@ -17,24 +17,8 @@ using namespace std; GPrx allTests(const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string secure; - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - cout << "testing stringToProxy... " << flush; - string ref = "d" + secure + ":" + protocol + " -p 12345 -t 2000"; + string ref = "d:default -p 12345 -t 2000"; Ice::ObjectPrx db = communicator->stringToProxy(ref); test(db); cout << "ok" << endl; diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp index ea50cd4a321..fee3ebe054f 100644 --- a/cpp/test/Ice/facets/Collocated.cpp +++ b/cpp/test/Ice/facets/Collocated.cpp @@ -16,16 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr d = new DI; adapter->add(d, Ice::stringToIdentity("d")); diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp index 6ff733cc2b0..d0901d14894 100644 --- a/cpp/test/Ice/facets/Server.cpp +++ b/cpp/test/Ice/facets/Server.cpp @@ -16,16 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr d = new DI; adapter->add(d, Ice::stringToIdentity("d")); diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp index 9c92d2b1302..b6875f7a409 100644 --- a/cpp/test/Ice/faultTolerance/AllTests.cpp +++ b/cpp/test/Ice/faultTolerance/AllTests.cpp @@ -18,28 +18,12 @@ using namespace std; void allTests(const Ice::CommunicatorPtr& communicator, const vector<int>& ports) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string secure; - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - cout << "testing stringToProxy... " << flush; ostringstream ref; - ref << "test" << secure; + ref << "test"; for (vector<int>::const_iterator p = ports.begin(); p != ports.end(); ++p) { - ref << ":" << protocol << " -t 4000 -p " << *p; + ref << ":default -t 4000 -p " << *p; } Ice::ObjectPrx base = communicator->stringToProxy(ref.str()); test(base); diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp index 84fb65827f2..f2015550c10 100644 --- a/cpp/test/Ice/faultTolerance/Server.cpp +++ b/cpp/test/Ice/faultTolerance/Server.cpp @@ -50,16 +50,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } ostringstream endpts; - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - endpts << protocol << " -p " << port; + endpts << "default -p " << port; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts.str()); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/Ice/inheritance/AllTests.cpp b/cpp/test/Ice/inheritance/AllTests.cpp index 31fcfd902b3..89efb521eb3 100644 --- a/cpp/test/Ice/inheritance/AllTests.cpp +++ b/cpp/test/Ice/inheritance/AllTests.cpp @@ -17,25 +17,8 @@ using namespace std; InitialPrx allTests(const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string secureFlag; - - if (!protocol.compare("ssl")) - { - secureFlag = " -s "; - } - - string ref = "initial" + secureFlag + ":" + protocol + " -p 12345 -t 2000"; - cout << "testing stringToProxy... " << flush; + string ref = "initial:default -p 12345 -t 2000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp index 30a39fc3ad8..30dfc6b7233 100644 --- a/cpp/test/Ice/inheritance/Collocated.cpp +++ b/cpp/test/Ice/inheritance/Collocated.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, Ice::stringToIdentity("initial")); diff --git a/cpp/test/Ice/inheritance/Server.cpp b/cpp/test/Ice/inheritance/Server.cpp index 3d1a3ab494d..72c3d71a759 100644 --- a/cpp/test/Ice/inheritance/Server.cpp +++ b/cpp/test/Ice/inheritance/Server.cpp @@ -16,16 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, Ice::stringToIdentity("initial")); diff --git a/cpp/test/Ice/locationForward/AllTests.cpp b/cpp/test/Ice/locationForward/AllTests.cpp index b8c07ae253a..c3ce91c96fb 100644 --- a/cpp/test/Ice/locationForward/AllTests.cpp +++ b/cpp/test/Ice/locationForward/AllTests.cpp @@ -17,27 +17,13 @@ using namespace std; void allTests(const Ice::CommunicatorPtr& communicator, int port, int lastPort) { - Ice::PropertiesPtr properties = communicator->getProperties(); - string protocol = properties->getProperty("Ice.Protocol"); - string secure; - - if (protocol.empty()) - { - protocol = "tcp"; - } - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - cout << "testing stringToProxy... " << flush; ostringstream ref; - ref << "test" << secure << ":" << protocol << " -t 2000 -p " << port; + ref << "test:default -t 2000 -p " << port; Ice::ObjectPrx base = communicator->stringToProxy(ref.str()); test(base); ostringstream lastRef; - lastRef << "test" << secure << ":" << protocol << " -t 2000 -p " << lastPort; + lastRef << "test:default -t 2000 -p " << lastPort; Ice::ObjectPrx lastBase = communicator->stringToProxy(lastRef.str()); test(lastBase); cout << "ok" << endl; diff --git a/cpp/test/Ice/locationForward/Server.cpp b/cpp/test/Ice/locationForward/Server.cpp index ddf7991b603..f5052e6faba 100644 --- a/cpp/test/Ice/locationForward/Server.cpp +++ b/cpp/test/Ice/locationForward/Server.cpp @@ -62,16 +62,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) } ostringstream endpts; - - Ice::PropertiesPtr properties = communicator->getProperties(); - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - endpts << protocol << " -p " << port; + endpts << "default -p " << port; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts.str()); Ice::ObjectPtr object = new TestI(adapter, fwd); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/Ice/objects/AllTests.cpp b/cpp/test/Ice/objects/AllTests.cpp index 999f712ca18..d56035fae13 100644 --- a/cpp/test/Ice/objects/AllTests.cpp +++ b/cpp/test/Ice/objects/AllTests.cpp @@ -18,26 +18,7 @@ InitialPrx allTests(const Ice::CommunicatorPtr& communicator, bool collocated) { cout << "testing stringToProxy... " << flush; - - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - string secure; - - if (protocol.empty()) - { - protocol = "tcp"; - } - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - - string endpts = protocol + " -p 12345 -t 2000"; - - string ref = "initial" + secure + ":" + endpts; - + string ref = "initial:default -p 12345 -t 2000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/objects/Collocated.cpp b/cpp/test/Ice/objects/Collocated.cpp index c9ca12a6a8c..797575818b8 100644 --- a/cpp/test/Ice/objects/Collocated.cpp +++ b/cpp/test/Ice/objects/Collocated.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); InitialPtr initial = new InitialI(adapter); adapter->add(initial, Ice::stringToIdentity("initial")); diff --git a/cpp/test/Ice/objects/Server.cpp b/cpp/test/Ice/objects/Server.cpp index f24b631536b..26fc8ddf062 100644 --- a/cpp/test/Ice/objects/Server.cpp +++ b/cpp/test/Ice/objects/Server.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); InitialPtr initial = new InitialI(adapter); adapter->add(initial, Ice::stringToIdentity("initial")); diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp index 53bcfc17831..93cafd817eb 100644 --- a/cpp/test/Ice/operations/AllTests.cpp +++ b/cpp/test/Ice/operations/AllTests.cpp @@ -17,34 +17,8 @@ using namespace std; Test::MyClassPrx allTests(const Ice::CommunicatorPtr& communicator) { - string ref; - - Ice::PropertiesPtr properties = communicator->getProperties(); - - string address = properties->getProperty("Ice.Address"); - string protocol = properties->getProperty("Ice.Protocol"); - string secure; - - if (protocol.empty()) - { - protocol = "tcp"; - } - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - - string endpts = protocol + " -p 12345 -t 2000"; - - if (!address.empty()) - { - endpts += " -h " + address; - } - - ref = "test" + secure + ":" + endpts; - cout << "testing stringToProxy... " << flush; + string ref = "test:default -p 12345 -t 2000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp index 96fda8fd7ac..48bf0bd5f22 100644 --- a/cpp/test/Ice/operations/Collocated.cpp +++ b/cpp/test/Ice/operations/Collocated.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new MyDerivedClassI(adapter, Ice::stringToIdentity("test")); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp index a175fa47773..3c4654b7a66 100644 --- a/cpp/test/Ice/operations/Server.cpp +++ b/cpp/test/Ice/operations/Server.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new MyDerivedClassI(adapter, Ice::stringToIdentity("test")); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/IcePack/simple/AllTests.cpp b/cpp/test/IcePack/simple/AllTests.cpp index 6bcad969b47..e581de549c0 100644 --- a/cpp/test/IcePack/simple/AllTests.cpp +++ b/cpp/test/IcePack/simple/AllTests.cpp @@ -18,27 +18,7 @@ TestPrx allTests(const Ice::CommunicatorPtr& communicator) { cout << "testing stringToProxy... " << flush; - string ref; - - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - string secure; - - if (protocol.empty()) - { - protocol = "tcp"; - } - - if (protocol.compare("ssl") == 0) - { - secure = " -s "; - } - - string endpts = protocol + " -p 12346 -t 2000"; - - ref = "test" + secure + ":" + endpts; - + string ref = "test:default -p 12346 -t 2000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); cout << "ok" << endl; diff --git a/cpp/test/IcePack/simple/Collocated.cpp b/cpp/test/IcePack/simple/Collocated.cpp index 1c2b5891388..cbddcd886a8 100644 --- a/cpp/test/IcePack/simple/Collocated.cpp +++ b/cpp/test/IcePack/simple/Collocated.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 2000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/IcePack/simple/Server.cpp b/cpp/test/IcePack/simple/Server.cpp index 9cdd46993ce..f936bfa400f 100644 --- a/cpp/test/IcePack/simple/Server.cpp +++ b/cpp/test/IcePack/simple/Server.cpp @@ -16,17 +16,7 @@ using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { - Ice::PropertiesPtr properties = communicator->getProperties(); - - string protocol = properties->getProperty("Ice.Protocol"); - - if (protocol.empty()) - { - protocol = "tcp"; - } - - string endpts = protocol + " -p 12345 -t 5000"; - + string endpts = "default -p 12345 -t 2000"; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, Ice::stringToIdentity("test")); diff --git a/cpp/test/IcePack/simple/run.py b/cpp/test/IcePack/simple/run.py index 691b863191d..67ded103f8f 100755 --- a/cpp/test/IcePack/simple/run.py +++ b/cpp/test/IcePack/simple/run.py @@ -28,8 +28,8 @@ updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) updatedClientServerOptions = TestUtil.clientServerOptions.replace("TOPLEVELDIR", toplevel) command = icePack + updatedClientServerOptions + ' --nowarn' + \ - r' "--Ice.Adapter.Forward.Endpoints=' + TestUtil.protocol + ' -p 12346 -t 5000"' + \ - r' "--Ice.Adapter.Admin.Endpoints=' + TestUtil.protocol + ' -p 12347 -t 5000"' + r' "--Ice.Adapter.Forward.Endpoints=default -p 12346 -t 5000"' + \ + r' "--Ice.Adapter.Admin.Endpoints=default -p 12347 -t 5000"' print "starting icepack...", icePackPipe = os.popen(command) TestUtil.getServerPid(icePackPipe) diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp index 02eb232146f..9c6538f2430 100644 --- a/cpp/test/IceStorm/single/Subscriber.cpp +++ b/cpp/test/IceStorm/single/Subscriber.cpp @@ -90,7 +90,7 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) return EXIT_FAILURE; } - Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("ClockAdapter", "tcp"); + Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("ClockAdapter", "default"); Ice::ObjectPtr single = new SingleI(communicator); Ice::ObjectPrx object = adapter->add(single, Ice::stringToIdentity("events#single")); diff --git a/cpp/test/IceStorm/single/run.py b/cpp/test/IceStorm/single/run.py index d1391398994..ddabe9e1211 100755 --- a/cpp/test/IceStorm/single/run.py +++ b/cpp/test/IceStorm/single/run.py @@ -40,7 +40,7 @@ TestUtil.cleanDbDir(dbdir) # TODO: --dbdir is a hack # command = iceStorm + updatedClientServerOptions + \ - r' --Ice.Adapter.TopicManager.Endpoints="tcp -p 12345"' + \ + r' --Ice.Adapter.TopicManager.Endpoints="default -p 12345"' + \ r' --dbdir ' + os.path.join(testdir, "db") print "starting icestorm...", |