From: Thomas Markwalder Date: Wed, 10 Apr 2019 13:31:12 +0000 (-0400) Subject: [#413,!288] Addressed review comments. X-Git-Tag: Kea-1.6.0-beta~270^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf958bf3295feefbb567039d2829cb0428ee2b5b;p=thirdparty%2Fkea.git [#413,!288] Addressed review comments. --- diff --git a/src/lib/dhcpsrv/srv_config.h b/src/lib/dhcpsrv/srv_config.h index 71636c8270..61c1aec044 100644 --- a/src/lib/dhcpsrv/srv_config.h +++ b/src/lib/dhcpsrv/srv_config.h @@ -628,25 +628,8 @@ private: /// @brief Merges the DHCPv4 configuration specified as a parameter into /// this configuration. /// - /// The general rule is that the configuration data from the @c other - /// object replaces configuration data held in this object instance. - /// The data that do not overlap between the two objects is simply - /// inserted into this configuration. - /// - /// @warning The call to @c merge may modify the data in the @c other - /// object. Therefore, the caller must not rely on the data held - /// in the @c other object after the call to @c merge. Also, the - /// data held in @c other must not be modified after the call to - /// @c merge because it may affect the merged configuration. - /// - /// The @c other parameter must be a @c SrvConfig or its derivation. - /// - /// Currently, the following parts of the v4 configuration are merged: - /// - globals - /// - shared-networks - /// - subnets - /// - /// @todo Add support for merging other configuration elements. + /// This is called by @c merge() to handle v4 specifics, such as + /// networks and subnets. /// /// @param other An object holding the configuration to be merged /// into this configuration. @@ -655,25 +638,8 @@ private: /// @brief Merges the DHCPv6 configuration specified as a parameter into /// this configuration. /// - /// The general rule is that the configuration data from the @c other - /// object replaces configuration data held in this object instance. - /// The data that do not overlap between the two objects is simply - /// inserted into this configuration. - /// - /// @warning The call to @c merge may modify the data in the @c other - /// object. Therefore, the caller must not rely on the data held - /// in the @c other object after the call to @c merge. Also, the - /// data held in @c other must not be modified after the call to - /// @c merge because it may affect the merged configuration. - /// - /// The @c other parameter must be a @c SrvConfig or its derivation. - /// - /// Currently, the following parts of the v6 configuration are merged: - /// - globals - /// - shared-networks - /// - subnets - /// - /// @todo Add support for merging other configuration elements. + /// This is called by @c merge() to handle v4 specifics, such as + /// networks and subnets. /// /// @param other An object holding the configuration to be merged /// into this configuration. diff --git a/src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc b/src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc index 8e9ea86a82..cd4e7ca468 100644 --- a/src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_shared_networks4_unittest.cc @@ -18,9 +18,11 @@ using namespace asiolink; namespace { -/// Attempts to verify an expected network within a collection of networks +/// @brief Attempts to verify an expected network within a collection +/// of networks +/// /// @param networks set of networks in which to look -/// @param name name of the expected network +/// @param name name of the expected network /// @param exp_valid expected valid lifetime of the network /// @param exp_subnets list of subnet IDs the network is expected to own void checkMergedNetwork(const CfgSharedNetworks4& networks, const std::string& name, diff --git a/src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc b/src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc index 5add7d9859..44f4b72c26 100644 --- a/src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc +++ b/src/lib/dhcpsrv/tests/cfg_shared_networks6_unittest.cc @@ -18,9 +18,11 @@ using namespace asiolink; namespace { -/// Attempts to verify an expected network within a collection of networks +/// @brief Attempts to verify an expected network within a collection +/// of networks +/// /// @param networks set of networks in which to look -/// @param name name of the expected network +/// @param name name of the expected network /// @param exp_valid expected valid lifetime of the network /// @param exp_subnets list of subnet IDs the network is expected to own void checkMergedNetwork(const CfgSharedNetworks6& networks, const std::string& name, diff --git a/src/lib/dhcpsrv/tests/srv_config_unittest.cc b/src/lib/dhcpsrv/tests/srv_config_unittest.cc index b1a0a09f28..0e81acfa9b 100644 --- a/src/lib/dhcpsrv/tests/srv_config_unittest.cc +++ b/src/lib/dhcpsrv/tests/srv_config_unittest.cc @@ -1056,7 +1056,6 @@ TEST_F(SrvConfigTest, mergeGlobals6) { // Set some explicit values. cfg_to.setDeclinePeriod(100); - cfg_to.setEchoClientId(false); cfg_to.setDhcp4o6Port(777); cfg_to.setServerTag("not_this_server");