summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/ClientUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2005-10-14 20:32:46 +0000
committerMark Spruiell <mes@zeroc.com>2005-10-14 20:32:46 +0000
commitb8d1163a957caf019e077057f34f0732457ff3b2 (patch)
tree7e871d23b533d168b8eeec33af9076446c59ce34 /cpp/src/IcePatch2/ClientUtil.cpp
parentfixing bug in batch flush in client (diff)
downloadice-b8d1163a957caf019e077057f34f0732457ff3b2.tar.bz2
ice-b8d1163a957caf019e077057f34f0732457ff3b2.tar.xz
ice-b8d1163a957caf019e077057f34f0732457ff3b2.zip
bug 480: adding InstanceName
Diffstat (limited to 'cpp/src/IcePatch2/ClientUtil.cpp')
-rwxr-xr-xcpp/src/IcePatch2/ClientUtil.cpp10
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);