]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3983] Changes after review:
authorTomek Mrugalski <tomasz@isc.org>
Wed, 2 Sep 2015 11:29:56 +0000 (13:29 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 2 Sep 2015 11:29:56 +0000 (13:29 +0200)
 - commitGlobalParameters renamed to setGlobalParameters
 - const added
 - Comments updated

src/bin/dhcp4/json_config_parser.cc
src/bin/dhcp6/json_config_parser.cc
src/lib/dhcpsrv/srv_config.h

index 39f36521bce3e14029008808908bdfe011515497..ec3d1116e10c4d25742ea0b2fe7014717d274fdc 100644 (file)
@@ -413,13 +413,13 @@ namespace dhcp {
     return (parser);
 }
 
-/// @brief Commits global parameters
+/// @brief Sets global parameters in staging configuration
 ///
 /// Currently this method sets the following global parameters:
 ///
 /// - echo-client-id
 /// - decline-probation-period
-void commitGlobalParameters4() {
+void setGlobalParameters4() {
     // Although the function is modest for now, it is certain that the number
     // of global switches will increase over time, hence the name.
 
@@ -609,8 +609,8 @@ configureDhcp4Server(Dhcpv4Srv&, isc::data::ConstElementPtr config_set) {
             // No need to commit interface names as this is handled by the
             // CfgMgr::commit() function.
 
-            // Apply global options
-            commitGlobalParameters4();
+            // Apply global options in the staging config.
+            setGlobalParameters4();
 
             // This occurs last as if it succeeds, there is no easy way
             // revert it.  As a result, the failure to commit a subsequent
index 1474c8ca6de726c088ec1e79275c7b6dddce488c..e6d43535dda7e7bd8019f9e082f843e83e94cc30 100644 (file)
@@ -704,12 +704,12 @@ namespace dhcp {
     return (parser);
 }
 
-/// @brief Commits global parameters
+/// @brief Sets global parameters in the staging configuration
 ///
 /// Currently this method sets the following global parameters:
 ///
 /// - decline-probation-period
-void commitGlobalParameters6() {
+void setGlobalParameters6() {
 
     // Set the probation period for decline handling.
     try {
@@ -890,8 +890,8 @@ configureDhcp6Server(Dhcpv6Srv&, isc::data::ConstElementPtr config_set) {
                 subnet_parser->commit();
             }
 
-            // Commit global options
-            commitGlobalParameters6();
+            // Apply global options in the staging config.
+            setGlobalParameters6();
 
             // No need to commit interface names as this is handled by the
             // CfgMgr::commit() function.
index c0e79e779580487a657aeca8b92d5fb6b99ddf4f..b1b9dbe88e9d6351e41492caeee1c5bb4d896470 100644 (file)
@@ -377,12 +377,19 @@ public:
     void removeStatistics();
 
     /// @brief Sets decline probation-period
+    ///
+    /// Probation-period is the timer, expressed, in seconds, that specifies how
+    /// long a lease is unavailable after reported as declined.
+    ///
     /// @param decline_timer number of seconds after declined lease is restored
-    void setDeclinePeriod(uint32_t decline_timer) {
+    void setDeclinePeriod(const uint32_t decline_timer) {
         decline_timer_ = decline_timer;
     }
 
-    /// @brief
+    /// @brief Returns probation-period
+    ///
+    /// See @ref setDeclinePeriod for brief discussion.
+    /// @return value of probation-period, expressed in seconds
     uint32_t getDeclinePeriod() const {
         return (decline_timer_);
     }