summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Server.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-10-12 12:57:39 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-10-12 12:57:39 +0000
commit54c707f2442e32d4ef8850c5cdbaa59edd0222cd (patch)
treed728b03155fd3944490de032d9a209186d619600 /cpp/src/IcePatch2/Server.cpp
parent- Distinguished between 64 bit and 32 bit Linux. (diff)
downloadice-54c707f2442e32d4ef8850c5cdbaa59edd0222cd.tar.bz2
ice-54c707f2442e32d4ef8850c5cdbaa59edd0222cd.tar.xz
ice-54c707f2442e32d4ef8850c5cdbaa59edd0222cd.zip
Fix bug 480 - default service identities
Diffstat (limited to 'cpp/src/IcePatch2/Server.cpp')
-rw-r--r--cpp/src/IcePatch2/Server.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/cpp/src/IcePatch2/Server.cpp b/cpp/src/IcePatch2/Server.cpp
index 37f2c22cece..cb45d297add 100644
--- a/cpp/src/IcePatch2/Server.cpp
+++ b/cpp/src/IcePatch2/Server.cpp
@@ -165,14 +165,27 @@ IcePatch2::PatcherService::start(int argc, char* argv[])
adminAdapter = communicator()->createObjectAdapter("IcePatch2.Admin");
}
+ const string instanceNameProperty = "IcePatch2.InstanceName";
+ string instanceName = properties->getPropertyWithDefault(instanceNameProperty, "IcePatch2");
+
const string idProperty = "IcePatch2.Identity";
- Identity id = stringToIdentity(properties->getPropertyWithDefault(idProperty, "IcePatch2/server"));
+ string idStr= properties->getProperty(idProperty);
+ if(idStr.empty())
+ {
+ idStr = instanceName + "/server";
+ }
+ Identity id = stringToIdentity(idStr);
adapter->add(new FileServerI(dataDir, infoSeq), id);
if(adminAdapter)
{
const string adminIdProperty = "IcePatch2.AdminIdentity";
- Identity adminId = stringToIdentity(properties->getPropertyWithDefault(adminIdProperty, "IcePatch2/admin"));
+ string adminIdStr = properties->getProperty(adminIdProperty);
+ if(adminIdStr.empty())
+ {
+ adminIdStr = instanceName + "/admin";
+ }
+ Identity adminId = stringToIdentity(adminIdStr);
adminAdapter->add(new AdminI(communicator()), adminId);
}