Commit 0c920665 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[3467] Addressed review comments.

parent db804253
......@@ -1097,7 +1097,7 @@ temporarily override a list of interface names and listen on all interfaces.
</section>
<section id="dhcp4-option-data-defaults">
<title>Unspecified parameters for option configuration</title>
<title>Unspecified parameters for DHCPv4 option configuration</title>
<para>In many cases it is not required to specify all parameters for
an option configuration and the default values may be used. However, it is
important to understand the implications of not specifing some of them
......
......@@ -1088,7 +1088,7 @@ should include options from the isc option space:
</section>
<section id="dhcp6-option-data-defaults">
<title>Unspecified parameters for option configuration</title>
<title>Unspecified parameters for DHCPv6 option configuration</title>
<para>In many cases it is not required to specify all parameters for
an option configuration and the default values can be used. However, it is
important to understand the implications of not specifing some of them
......
// Copyright (C) 2011-2013 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -61,7 +61,7 @@ public:
/// @param u universe (v4 or V6)
/// @param name Option name.
///
/// @return Pointer the option definition or NULL pointer it option
/// @return Pointer to the option definition or NULL pointer if option
/// definition has not been found.
static OptionDefinitionPtr getOptionDef(const Option::Universe u,
const std::string& name);
......
......@@ -350,7 +350,9 @@ OptionDataParser::extractCode(ConstElementPtr parent) const {
code = uint32_values_->getParam("code");
} catch (const exception& ex) {
return (OptionalValue<uint32_t>(code));
// The code parameter was not found. Return an unspecified
// value.
return (OptionalValue<uint32_t>());
}
if (code == 0) {
......@@ -385,7 +387,7 @@ OptionDataParser::extractName(ConstElementPtr parent) const {
name = string_values_->getParam("name");
} catch (...) {
return (OptionalValue<std::string>(name));
return (OptionalValue<std::string>());
}
if (name.find(" ") != std::string::npos) {
......@@ -404,6 +406,7 @@ OptionDataParser::extractData() const {
data = string_values_->getParam("data");
} catch (...) {
// The "data" parameter was not found. Return an empty value.
return (data);
}
......
......@@ -596,7 +596,7 @@ private:
/// @brief Retrieves parsed option name as an optional value.
///
/// @param parent A data element holding full option data configuration.
/// It is used here to log a position if the element holding a code
/// It is used here to log a position if the element holding a name
/// is not specified and its position is therefore unavailable.
///
/// @return Option name, possibly unspecified.
......
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