// 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.
}
// 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