summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeCache.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-12-21 09:35:55 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-12-21 09:35:55 +0000
commit58a095756e6dba2e48c1460cbc4712b7fbfcb028 (patch)
treef5fa3572de69b1720720ebfab9e3b9a9ec813fa7 /cpp/src/IceGrid/NodeCache.cpp
parent*** empty log message *** (diff)
downloadice-58a095756e6dba2e48c1460cbc4712b7fbfcb028.tar.bz2
ice-58a095756e6dba2e48c1460cbc4712b7fbfcb028.tar.xz
ice-58a095756e6dba2e48c1460cbc4712b7fbfcb028.zip
Fixed iceVersion issues
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r--cpp/src/IceGrid/NodeCache.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp
index adb0feb1236..390f51ebb5c 100644
--- a/cpp/src/IceGrid/NodeCache.cpp
+++ b/cpp/src/IceGrid/NodeCache.cpp
@@ -55,23 +55,22 @@ struct ToInternalServerDescriptor : std::unary_function<CommunicatorDescriptorPt
//
// Add the adapters and their configuration.
//
- string oaPropertyPrefix = getMMVersion(_desc->iceVersion) < 30200 ? "" : "Ice.OA.";
for(AdapterDescriptorSeq::const_iterator q = desc->adapters.begin(); q != desc->adapters.end(); ++q)
{
_desc->adapters.push_back(new InternalAdapterDescriptor(q->id, q->serverLifetime));
props.push_back(createProperty("# Object adapter " + q->name));
PropertyDescriptor prop = removeProperty(communicatorProps, "Ice.OA." + q->name + ".Endpoints");
- prop.name = oaPropertyPrefix + q->name + ".Endpoints";
+ prop.name = "Ice.OA." + q->name + ".Endpoints";
props.push_back(prop);
- props.push_back(createProperty(oaPropertyPrefix + q->name + ".AdapterId", q->id));
+ props.push_back(createProperty("Ice.OA." + q->name + ".AdapterId", q->id));
if(!q->replicaGroupId.empty())
{
- props.push_back(createProperty(oaPropertyPrefix + q->name + ".ReplicaGroupId", q->replicaGroupId));
+ props.push_back(createProperty("Ice.OA." + q->name + ".ReplicaGroupId", q->replicaGroupId));
}
if(q->registerProcess)
{
- props.push_back(createProperty(oaPropertyPrefix + q->name + ".RegisterProcess", "1"));
+ props.push_back(createProperty("Ice.OA." + q->name + ".RegisterProcess", "1"));
_desc->processRegistered = true;
}
}
@@ -893,5 +892,25 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
// descriptor.
//
forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo()))(info.descriptor);
+
+ //
+ // Transform the OA properties to the old naming (Ice.OA.XXX.* ->
+ // XXX.*) for server with a version < 3.2.0
+ //
+ if(getMMVersion(server->iceVersion) < 30200)
+ {
+ const string oaPrefix = "Ice.OA.";
+ for(PropertyDescriptorSeqDict::iterator p = server->properties.begin(); p != server->properties.end(); ++p)
+ {
+ for(PropertyDescriptorSeq::iterator q = p->second.begin(); q != p->second.end(); ++q)
+ {
+ if(q->name.find(oaPrefix) == 0)
+ {
+ q->name = q->name.substr(oaPrefix.size());
+ }
+ }
+ }
+ }
+
return server;
}