diff options
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index 210c1563fed..51ed870f3de 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -325,9 +325,9 @@ NodeService::startImpl(int argc, char* argv[], int& status) locatorId.category = properties->getPropertyWithDefault("IceGrid.InstanceName", "IceGrid"); locatorId.name = "Locator"; string endpoints = properties->getProperty("IceGrid.Registry.Client.Endpoints"); - string locatorPrx = "\"" + communicator()->identityToString(locatorId) + "\" :" + endpoints; - communicator()->setDefaultLocator(Ice::LocatorPrx::uncheckedCast(communicator()->stringToProxy(locatorPrx))); - properties->setProperty("Ice.Default.Locator", locatorPrx); + string locPrx = "\"" + communicator()->identityToString(locatorId) + "\" :" + endpoints; + communicator()->setDefaultLocator(Ice::LocatorPrx::uncheckedCast(communicator()->stringToProxy(locPrx))); + properties->setProperty("Ice.Default.Locator", locPrx); } } else if(properties->getProperty("Ice.Default.Locator").empty()) @@ -571,12 +571,11 @@ NodeService::startImpl(int argc, char* argv[], int& status) { try { - Ice::Identity registryId; - registryId.category = instanceName; - registryId.name = "Registry"; + Ice::Identity regId; + regId.category = instanceName; + regId.name = "Registry"; - RegistryPrx registry = RegistryPrx::checkedCast( - communicator()->stringToProxy("\"" + communicator()->identityToString(registryId) + "\"")); + RegistryPrx registry = RegistryPrx::checkedCast(communicator()->getDefaultLocator()->findObjectById(regId)); if(!registry) { throw "invalid registry"; |