diff options
Diffstat (limited to 'cpp/src/IcePatch2/ClientUtil.cpp')
-rwxr-xr-x | cpp/src/IcePatch2/ClientUtil.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp index e65f1505b9c..b09d600345d 100755 --- a/cpp/src/IcePatch2/ClientUtil.cpp +++ b/cpp/src/IcePatch2/ClientUtil.cpp @@ -156,9 +156,15 @@ IcePatch2::Patcher::Patcher(const CommunicatorPtr& communicator, const PatcherFe { throw string("property `") + endpointsProperty + "' is not set"; } - + const char* idProperty = "IcePatch2.Identity"; - const Identity id = stringToIdentity(properties->getPropertyWithDefault(idProperty, "IcePatch2/server")); + string idStr = properties->getProperty(idProperty); + if(idStr.empty()) + { + const char* instanceProperty = "IcePatch2.InstanceName"; + idStr = properties->getPropertyWithDefault(instanceProperty, "IcePatch2") + "/server"; + } + const Identity id = stringToIdentity(idStr); ObjectPrx serverBase = communicator->stringToProxy(identityToString(id) + ':' + endpoints); FileServerPrx server = FileServerPrx::checkedCast(serverBase); |