Commit 8b5ded2f authored by Marcin Siodelski's avatar Marcin Siodelski

[3360] Fix dbaccess parser to use "persist" value as boolean.

parent 9ed199e3
......@@ -58,7 +58,15 @@ DbAccessParser::build(isc::data::ConstElementPtr config_value) {
// 3. Update the copy with the passed keywords.
BOOST_FOREACH(ConfigPair param, config_value->mapValue()) {
values_copy[param.first] = param.second->stringValue();
// The persist parameter is the only boolean parameter at the
// moment. It needs special handling.
if (param.first != "persist") {
values_copy[param.first] = param.second->stringValue();
} else {
values_copy[param.first] = (param.second->boolValue() ?
"true" : "false");
}
}
// 4. Perform validation checks on the updated set of keyword/values.
......
......@@ -87,8 +87,14 @@ public:
}
// Add the keyword and value - make sure that they are quoted.
result += quote + keyval[i] + quote + colon + space +
quote + keyval[i + 1] + quote;
// The only parameter which is not quoted is persist as it
// is a boolean value.
result += quote + keyval[i] + quote + colon + space;
if (keyval[i] != "persist") {
result += quote + keyval[i + 1] + quote;
} else {
result += keyval[i + 1];
}
}
// Add the terminating brace
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment