diff options
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")) { |