diff options
author | Benoit Foucher <benoit@zeroc.com> | 2009-02-04 11:21:26 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2009-02-04 11:21:26 +0100 |
commit | 33204f403463990853c4393c2f8a2c909f26774a (patch) | |
tree | d389b4c7ecf8717a5437fdcadea2935d152dd3cf /cpp/src/IceGrid/NodeCache.cpp | |
parent | Additional fix for bug 3701 - bad generated code (diff) | |
download | ice-33204f403463990853c4393c2f8a2c909f26774a.tar.bz2 ice-33204f403463990853c4393c2f8a2c909f26774a.tar.xz ice-33204f403463990853c4393c2f8a2c909f26774a.zip |
Additional fixes for bug 3704 and 2841
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index dc6eb107a11..7bd3afe0e63 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -133,6 +133,21 @@ struct ToInternalServerDescriptor : std::unary_function<CommunicatorDescriptorPt } copy(communicatorProps.begin(), communicatorProps.end(), back_inserter(props)); } + + // + // For Ice servers > 3.3.0 escape the properties. + // + if(_iceVersion == 0 || _iceVersion >= 30300) + { + for(PropertyDescriptorSeq::iterator p = props.begin(); p != props.end(); ++p) + { + if(p->name.find('#') != 0 || !p->value.empty()) + { + p->name = escapeProperty(p->name); + p->value = escapeProperty(p->value); + } + } + } } PropertyDescriptor @@ -976,26 +991,5 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const // 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; } |