Commit 70bb412f authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[#150,!385] Addressed review comments:

- extra checks for parent pointer
- comments corrected
parent fa3d60af
......@@ -2984,7 +2984,7 @@ TEST_F(TokenTest, subOptionNoOption) {
// we should have one value on the stack
ASSERT_EQ(1, values_.size());
// The option should NOT be found (there is option 82),
// The option should NOT be found (there is no option 82),
// so the expression should evaluate to ""
EXPECT_EQ("", values_.top());
......
......@@ -988,6 +988,9 @@ TokenInteger::TokenInteger(const uint32_t value)
OptionPtr
TokenSubOption::getSubOption(const OptionPtr& parent) {
if (!parent) {
return (OptionPtr());
}
return (parent->getOption(sub_option_code_));
}
......
......@@ -1060,7 +1060,7 @@ protected:
/// @brief Token that represents sub-options in DHCPv4 and DHCPv6.
///
/// It covers any options which encapsulate sub-options, for instance
/// dhcp-agent-options (72, DHCPv4) or rsoo (66, DHCPv6).
/// dhcp-agent-options (82, DHCPv4) or rsoo (66, DHCPv6).
/// This class is derived from TokenOption and leverages its ability
/// to operate on sub-options. It also adds additional capabilities.
///
......
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