diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-04-13 14:06:44 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-04-13 14:06:44 +0200 |
commit | b648cad742bd03461da002629d4ac90cc54df0ba (patch) | |
tree | 3c9cfb0f3df5f7f281fdab85f9b4f221bd5da665 /cpp/src/IceDiscovery/PluginI.cpp | |
parent | minor edits to changelog (diff) | |
download | ice-b648cad742bd03461da002629d4ac90cc54df0ba.tar.bz2 ice-b648cad742bd03461da002629d4ac90cc54df0ba.tar.xz ice-b648cad742bd03461da002629d4ac90cc54df0ba.zip |
Fixed ICE-7801 - icegridadmin discovered locator not set
Diffstat (limited to 'cpp/src/IceDiscovery/PluginI.cpp')
-rw-r--r-- | cpp/src/IceDiscovery/PluginI.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp index 37992bdab35..1a76f34ff06 100644 --- a/cpp/src/IceDiscovery/PluginI.cpp +++ b/cpp/src/IceDiscovery/PluginI.cpp @@ -148,7 +148,8 @@ PluginI::initialize() // Ice::ObjectPrxPtr loc = _locatorAdapter->addWithUUID(ICE_MAKE_SHARED(LocatorI, _lookup, locatorRegistryPrx)); _defaultLocator = _communicator->getDefaultLocator(); - _communicator->setDefaultLocator(ICE_UNCHECKED_CAST(Ice::LocatorPrx, loc)); + _locator = ICE_UNCHECKED_CAST(Ice::LocatorPrx, loc); + _communicator->setDefaultLocator(_locator); _multicastAdapter->activate(); _replyAdapter->activate(); @@ -162,5 +163,9 @@ PluginI::destroy() _replyAdapter->destroy(); _locatorAdapter->destroy(); _lookup->destroy(); - _communicator->setDefaultLocator(_defaultLocator); + // Restore original default locator proxy, if the user didn't change it in the meantime. + if(_communicator->getDefaultLocator() == _locator) + { + _communicator->setDefaultLocator(_defaultLocator); + } } |