Commit 85b0a75a authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[2786] Option factory function uses iterators to create OptionCustom.

parent 0f3dd4e1
......@@ -463,10 +463,9 @@ Dhcpv6Srv::createStatusCode(uint16_t code, const std::string& text) {
// As there is no dedicated class to represent Status Code
// the OptionCustom class should be returned here.
boost::shared_ptr<OptionCustom> option_status =
OptionCustom>(status_code_def->optionFactory(Option::V6, D6O_STATUS_CODE));
// the OptionCustom class is used here instead.
OptionCustomPtr option_status =
OptionCustomPtr(new OptionCustom(*status_code_def, Option::V6));
// Set status code to 'code' (0 - means data field #0).
......@@ -186,7 +186,7 @@ OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
return (OptionPtr(new OptionCustom(*this, u, OptionBuffer(begin, end))));
return (OptionPtr(new OptionCustom(*this, u, begin, end)));
} catch (const Exception& ex) {
isc_throw(InvalidOptionValue, ex.what());
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