]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3467] Addressed review comments.
authorMarcin Siodelski <marcin@isc.org>
Tue, 9 Dec 2014 08:31:41 +0000 (09:31 +0100)
committerMarcin Siodelski <marcin@isc.org>
Tue, 9 Dec 2014 08:31:41 +0000 (09:31 +0100)
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/lib/dhcp/libdhcp++.h
src/lib/dhcpsrv/dhcp_parsers.cc
src/lib/dhcpsrv/dhcp_parsers.h

index cd40316ecd82da1e07b9bcbd4febf1a7e33538db..14565d1f20b4feb0670a4352a3c31744fd11d114 100644 (file)
@@ -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
index 3b846612919665c53a9ef571df19d9e3f385d374..a69662aa9c680a811246ad93ddeefa32da9b49fb 100644 (file)
@@ -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
index de25da891ef053e073abecaa323d70d0525f05e5..45b0ae388d123e5e60e0456f92638c4a68e4fd38 100644 (file)
@@ -1,4 +1,4 @@
-// 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);
index a62cfb76eafdcec73a428dd24db5660beee794aa..542c0947a929c921c9c90192b334909d8eb16760 100644 (file)
@@ -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);
     }
 
index f83fbfb72c24b6c1060218bab73b5630d85c5672..a0999622ef5556eaba4741945109add0b0b6f92d 100644 (file)
@@ -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.