diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2014-10-09 16:03:12 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2014-10-09 16:03:12 -0230 |
commit | 0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e (patch) | |
tree | b9836942ec10171075ddbeb2c68dd529da746e0c /cpp/src | |
parent | Windows TP README updates (diff) | |
download | ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.tar.bz2 ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.tar.xz ice-0bb57b389cd9f57ddeb6ab115ccfb5bc7f07a09e.zip |
ICE-5671 make sure router/locator have not already been set by plugin loading
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index a14a07f16c4..46e86c10b3e 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1553,20 +1553,25 @@ IceInternal::Instance::finishSetup(int& argc, char* argv[], const Ice::Communica _clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0); // - // Get default router and locator proxies. Don't move this - // initialization before the plug-in initialization!!! The proxies - // might depend on endpoint factories to be installed by plug-ins. + // The default router/locator may have been set during the loading of plugins. + // Therefore we make sure it is not already set before checking the property. // - RouterPrx router = RouterPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Router")); - if(router) + if(!_referenceFactory->getDefaultRouter()) { - _referenceFactory = _referenceFactory->setDefaultRouter(router); + RouterPrx router = RouterPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Router")); + if(router) + { + _referenceFactory = _referenceFactory->setDefaultRouter(router); + } } - LocatorPrx locator = LocatorPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Locator")); - if(locator) + if(!_referenceFactory->getDefaultLocator()) { - _referenceFactory = _referenceFactory->setDefaultLocator(locator); + LocatorPrx locator = LocatorPrx::uncheckedCast(_proxyFactory->propertyToProxy("Ice.Default.Locator")); + if(locator) + { + _referenceFactory = _referenceFactory->setDefaultLocator(locator); + } } // |