2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 14:05:33 +00:00

[5039] Element::getMutableMap implemented

This commit is contained in:
Tomek Mrugalski
2016-12-22 16:36:28 +01:00
parent 7e639550bd
commit 0d579d2a20
4 changed files with 18 additions and 11 deletions

View File

@@ -567,10 +567,7 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
// This is a way to convert ConstElementPtr to ElementPtr.
// We need a config that can be edited, because we will insert
// default values and will insert derived values as well.
std::map<std::string, ConstElementPtr> values;
config_set->getValue(values);
ElementPtr mutable_cfg(new MapElement());
mutable_cfg->setValue(values);
ElementPtr mutable_cfg = Element::getMutableMap(config_set);
// Set all default values if not specified by the user.
SimpleParser4::setAllDefaults(mutable_cfg);