summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/IceGridNode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp
index bf38d3affb2..0299c266ea0 100644
--- a/cpp/src/IceGrid/IceGridNode.cpp
+++ b/cpp/src/IceGrid/IceGridNode.cpp
@@ -268,9 +268,11 @@ NodeService::start(int argc, char* argv[])
//
if(properties->getProperty("Ice.Default.Locator").empty())
{
- const string instanceNameProperty = "IceGrid.InstanceName";
- const string locatorId = properties->getPropertyWithDefault(instanceNameProperty, "IceGrid") + "/Locator";
- string locatorPrx = locatorId + ":" + properties->getProperty("IceGrid.Registry.Client.Endpoints");
+ Identity locatorId;
+ locatorId.category = properties->getPropertyWithDefault("IceGrid.InstanceName", "IceGrid");
+ locatorId.name = "Locator";
+ string locatorPrx = "\"" + communicator()->identityToString(locatorId) + "\" :" +
+ properties->getProperty("IceGrid.Registry.Client.Endpoints");
communicator()->setDefaultLocator(LocatorPrx::uncheckedCast(communicator()->stringToProxy(locatorPrx)));
properties->setProperty("Ice.Default.Locator", locatorPrx);
}