diff options
author | Jose <jose@zeroc.com> | 2011-04-04 17:21:19 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2011-04-04 17:21:19 +0200 |
commit | 4ad90268d2a4d86459ec73aea39d589871910ae0 (patch) | |
tree | 4bad5577e7cf3118ad5874aded6e3c5aa2723510 /cpp/src/IceGrid/NodeCache.cpp | |
parent | 4992 - typo in Connection.ice (diff) | |
download | ice-4ad90268d2a4d86459ec73aea39d589871910ae0.tar.bz2 ice-4ad90268d2a4d86459ec73aea39d589871910ae0.tar.xz ice-4ad90268d2a4d86459ec73aea39d589871910ae0.zip |
Fix for bug 4799: minimize escapes in config files generated by IceGrid
Diffstat (limited to 'cpp/src/IceGrid/NodeCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/NodeCache.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/cpp/src/IceGrid/NodeCache.cpp b/cpp/src/IceGrid/NodeCache.cpp index 584c88bae6e..19d9f5706fb 100644 --- a/cpp/src/IceGrid/NodeCache.cpp +++ b/cpp/src/IceGrid/NodeCache.cpp @@ -143,7 +143,7 @@ struct ToInternalServerDescriptor : std::unary_function<CommunicatorDescriptorPt { if(p->name.find('#') != 0 || !p->value.empty()) { - p->name = escapeProperty(p->name); + p->name = escapeProperty(p->name, true); p->value = escapeProperty(p->value); } } @@ -954,9 +954,23 @@ NodeEntry::getInternalServerDescriptor(const ServerInfo& info) const { ServiceDescriptorPtr s = p->descriptor; const string path = _session->getInfo()->dataDir + "/servers/" + server->id + "/config/config_" + s->name; - props.push_back(createProperty("IceBox.Service." + s->name, s->entry + " --Ice.Config='" + - escapeProperty(path) + "'")); - servicesStr += s->name + " "; + + // + // We escape the path here because the command-line option --Ice.Config=xxx will be parsed an encoded + // (escaped) property + // For example, \\server\dir\file.cfg needs to become \\\server\dir\file.cfg or \\\\server\\dir\\file.cfg. + // + props.push_back(createProperty("IceBox.Service." + s->name, s->entry + " --Ice.Config='" + + escapeProperty(path) + "'")); + + if(servicesStr.empty()) + { + servicesStr = s->name; + } + else + { + servicesStr += " " + s->name; + } } if(!hasProperty(info.descriptor->propertySet.properties, "IceBox.InstanceName")) { |