Commit 4b379092 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰

[3983] Changes after review:

 - commitGlobalParameters renamed to setGlobalParameters
 - const added
 - Comments updated
parent cd3e4d6c
......@@ -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
......
......@@ -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.
......
......@@ -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_);
}
......
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