diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceGrid/Internal.ice | 3 | ||||
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 10 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 15 |
3 files changed, 22 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/Internal.ice b/cpp/src/IceGrid/Internal.ice index 48419c3f531..ef3d4ab8725 100644 --- a/cpp/src/IceGrid/Internal.ice +++ b/cpp/src/IceGrid/Internal.ice @@ -69,6 +69,9 @@ class InternalServerDescriptor /** The application revision. */ int revision; + /** The Ice version. */ + int iceVersion; + /** The id of the session which allocated the server. */ string sessionId; diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 3e2b67a2025..01e308fed58 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: // - int iceVersion = 0; + server->iceVersion = 0; if(info.descriptor->iceVersion != "") { - iceVersion = getMMVersion(info.descriptor->iceVersion); + server->iceVersion = getMMVersion(info.descriptor->iceVersion); } server->processRegistered = false; - if(iceVersion == 0 || iceVersion >= 30300) + if(server->iceVersion == 0 || server->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(iceVersion != 0 && iceVersion < 30300) + if(server->iceVersion != 0 && server->iceVersion < 30300) { if(hasProperty(iceBox->propertySet.properties, "IceBox.ServiceManager.RegisterProcess")) { @@ -975,7 +975,7 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const // logs, adapters, db envs and properties to the internal server // descriptor. // - forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), iceVersion))(info.descriptor); + forEachCommunicator(ToInternalServerDescriptor(server, _session->getInfo(), server->iceVersion))(info.descriptor); return server; } diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 81a85c97157..1ebd9e84ba3 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -2127,6 +2127,12 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) // Create the configuration files, remove the old ones. // { + // + // We do not want to esapce the properties if the Ice version is + // previous to Ice 3.3. + // + bool escapeProperties = (_desc->iceVersion == 0 || _desc->iceVersion > 30300); + Ice::StringSeq knownFiles; for(PropertyDescriptorSeqDict::const_iterator p = properties.begin(); p != properties.end(); ++p) { @@ -2147,7 +2153,14 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor) } else { - configfile << escapeProperty(r->name) << "=" << escapeProperty(r->value) << endl; + if(escapeProperties) + { + configfile << escapeProperty(r->name) << "=" << escapeProperty(r->value) << endl; + } + else + { + configfile << r->name << "=" << r->value << endl; + } } } configfile.close(); |