diff options
author | Mark Spruiell <mes@zeroc.com> | 2015-12-17 11:45:27 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2015-12-17 11:45:27 -0800 |
commit | 884e2be89b0cd997f372c59f05bf05a9a5372b60 (patch) | |
tree | 53d2123abf22042f827d0e83b6093cea038c3b3a /cpp/test/Ice/binding/TestI.cpp | |
parent | Merge branch '3.6' (diff) | |
download | ice-884e2be89b0cd997f372c59f05bf05a9a5372b60.tar.bz2 ice-884e2be89b0cd997f372c59f05bf05a9a5372b60.tar.xz ice-884e2be89b0cd997f372c59f05bf05a9a5372b60.zip |
Fixes for Bluetooth plug-ins.
Updates to testsuite to support Bluetooth and remote servers.
Diffstat (limited to 'cpp/test/Ice/binding/TestI.cpp')
-rw-r--r-- | cpp/test/Ice/binding/TestI.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/test/Ice/binding/TestI.cpp b/cpp/test/Ice/binding/TestI.cpp index 104966084d0..cdf9d7595c9 100644 --- a/cpp/test/Ice/binding/TestI.cpp +++ b/cpp/test/Ice/binding/TestI.cpp @@ -26,19 +26,23 @@ RemoteObjectAdapterPrx RemoteCommunicatorI::createObjectAdapter(const string& name, const string& endpts, const Current& current) #endif { + Ice::CommunicatorPtr com = current.adapter->getCommunicator(); + const string defaultProtocol = com->getProperties()->getProperty("Ice.Default.Protocol"); + string endpoints = endpts; - if(endpoints.find("-p") == string::npos) + if(defaultProtocol != "bt") { - // Use a fixed port if none is specified (bug 2896) - ostringstream os; - os << endpoints << " -h \"" - << (current.adapter->getCommunicator()->getProperties()->getPropertyWithDefault( - "Ice.Default.Host", "127.0.0.1")) - << "\" -p " << _nextPort++; - endpoints = os.str(); + if(endpoints.find("-p") == string::npos) + { + // Use a fixed port if none is specified (bug 2896) + ostringstream os; + os << endpoints << " -h \"" + << (com->getProperties()->getPropertyWithDefault("Ice.Default.Host", "127.0.0.1")) + << "\" -p " << _nextPort++; + endpoints = os.str(); + } } - Ice::CommunicatorPtr com = current.adapter->getCommunicator(); com->getProperties()->setProperty(name + ".ThreadPool.Size", "1"); ObjectAdapterPtr adapter = com->createObjectAdapterWithEndpoints(name, endpoints); return ICE_UNCHECKED_CAST(RemoteObjectAdapterPrx, current.adapter->addWithUUID(ICE_MAKE_SHARED(RemoteObjectAdapterI, adapter))); |