diff options
author | Francis Dupont <fdupont@isc.org> | 2020-12-17 22:24:00 +0100 |
---|---|---|
committer | Francis Dupont <fdupont@isc.org> | 2021-01-11 15:28:01 +0100 |
commit | 6641918e690d186bb3d3578f21f69ee679acfe3f (patch) | |
tree | cf1297a19408d500588525be78ea91a1390d15d9 /src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc | |
parent | [#1585] Checkpoint: libdhcp tests (diff) | |
download | kea-6641918e690d186bb3d3578f21f69ee679acfe3f.tar.xz kea-6641918e690d186bb3d3578f21f69ee679acfe3f.zip |
[#1585] Checkpoint: did first pass
Diffstat (limited to 'src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc')
-rw-r--r-- | src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc index 64b9bb1caa..819e80f4e8 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc @@ -427,6 +427,7 @@ MySqlConfigBackendImpl::getOptionDefs(const int index, // Create array option. last_def = OptionDefinition::create(out_bindings[2]->getString(), out_bindings[1]->getInteger<uint16_t>(), + out_bindings[3]->getString(), static_cast<OptionDataType> (out_bindings[4]->getInteger<uint8_t>()), array_type); @@ -434,14 +435,12 @@ MySqlConfigBackendImpl::getOptionDefs(const int index, // Create non-array option. last_def = OptionDefinition::create(out_bindings[2]->getString(), out_bindings[1]->getInteger<uint16_t>(), + out_bindings[3]->getString(), static_cast<OptionDataType> (out_bindings[4]->getInteger<uint8_t>()), out_bindings[7]->getStringOrDefault("").c_str()); } - // space - last_def->setOptionSpaceName(out_bindings[3]->getStringOrDefault("")); - // id last_def->setId(last_def_id); @@ -538,8 +537,7 @@ MySqlConfigBackendImpl::createUpdateOptionDef(const db::ServerSelector& server_s MySqlBindingCollection in_bindings = { MySqlBinding::createInteger<uint16_t>(option_def->getCode()), MySqlBinding::createString(option_def->getName()), - MySqlBinding::createString(option_def->getOptionSpaceName().empty() ? - space : option_def->getOptionSpaceName()), + MySqlBinding::createString(option_def->getOptionSpaceName()), MySqlBinding::createInteger<uint8_t>(static_cast<uint8_t>(option_def->getType())), MySqlBinding::createTimestamp(option_def->getModificationTime()), MySqlBinding::createBool(option_def->getArrayType()), |