summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/NodeCache.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-11-07 11:29:35 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-11-07 11:29:35 -0330
commit5129377a9d7ea4fcb9809be9022d4cff3cef896e (patch)
tree072a249461de5d7e1428c53f51aa08f03e8fae16 /cpp/src/IceGrid/NodeCache.cpp
parentBug 3415 (diff)
downloadice-5129377a9d7ea4fcb9809be9022d4cff3cef896e.tar.bz2
ice-5129377a9d7ea4fcb9809be9022d4cff3cef896e.tar.xz
ice-5129377a9d7ea4fcb9809be9022d4cff3cef896e.zip
Bug 3529
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r--cpp/src/IceGrid/NodeCache.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp
index 01e308fed58..b3c3f1e4365 100644
--- a/cpp/src/IceGrid/NodeCache.cpp
+++ b/cpp/src/IceGrid/NodeCache.cpp
@@ -898,14 +898,14 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
//
// For newer versions of Ice, we generate Ice.Admin properties:
//
- server->iceVersion = 0;
+ int iceVersion = 0;
if(info.descriptor->iceVersion != "")
{
- server->iceVersion = getMMVersion(info.descriptor->iceVersion);
+ iceVersion = getMMVersion(info.descriptor->iceVersion);
}
server->processRegistered = false;
- if(server->iceVersion == 0 || server->iceVersion >= 30300)
+ if(iceVersion == 0 || iceVersion >= 30300)
{
props.push_back(createProperty("Ice.Admin.ServerId", info.descriptor->id));
if(hasProperty(info.descriptor->propertySet.properties, "Ice.Admin.Endpoints"))
@@ -949,7 +949,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
}
props.push_back(createProperty("IceBox.LoadOrder", servicesStr));
- if(server->iceVersion != 0 && server->iceVersion < 30300)
+ if(iceVersion != 0 && iceVersion < 30300)
{
if(hasProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess"))
{
@@ -975,7 +975,27 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const
// logs, adapters, db envs and properties to the internal server
// descriptor.
//
- forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), server->iceVersion))(info.descriptor);
+ forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), iceVersion))(info.descriptor);
+
+ //
+ // For Ice servers > 3.3.0 escape the properties.
+ //
+ if(iceVersion == 0 || iceVersion >= 30300)
+ {
+ PropertyDescriptorSeq newProps;
+ for(PropertyDescriptorSeq::const_iterator p = props.begin(); p != props.end(); ++p)
+ {
+ if(p->value.empty() && p->name.find('#') == 0)
+ {
+ newProps.push_back(createProperty(p->name));
+ }
+ else
+ {
+ newProps.push_back(createProperty(escapeProperty(p->name), escapeProperty(p->value)));
+ }
+ }
+ server->properties["config"] = newProps;
+ }
return server;
}