From: Thomas Markwalder Date: Wed, 12 Aug 2020 16:43:22 +0000 (-0400) Subject: [#1369] More review fixes. X-Git-Tag: Kea-1.8.0~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dea3ca238033ef522d99f36561ae900a42ed9a0a;p=thirdparty%2Fkea.git [#1369] More review fixes. --- diff --git a/ChangeLog b/ChangeLog index 74b226522f..b160841919 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 1782. [bug] tmark Corrected a bug that causes kea-dhcp4/kea-dhcp6 servers to crash after - losing connectivity to a configuration backend database. The servers + losing connectivity to a configuration backend database. The servers now correctly honor the max-reconnect-tries parameter. (Gitlab #1369) diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc index 5741a94fd8..adfb2cef7a 100644 --- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc +++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc @@ -1136,7 +1136,7 @@ void ControlledDhcpv4Srv::dbReconnect(ReconnectCtlPtr db_reconnect_ctl) { bool reopened = false; - // We lost at least one of them, Reopen all of them (lease, host, and CB databases). + // We lost at least one of them. Reopen all of them (lease, host, and CB databases). try { CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess(); cfg_db->createManagers(); diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index f89da13a0d..faf115a913 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -1155,7 +1155,7 @@ void ControlledDhcpv6Srv::dbReconnect(ReconnectCtlPtr db_reconnect_ctl) { bool reopened = false; - // We lost at least one of them, Reopen all of them (lease, host, and CB databases) + // We lost at least one of them. Reopen all of them (lease, host, and CB databases). try { CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess(); cfg_db->createManagers(); diff --git a/src/lib/database/database_connection.h b/src/lib/database/database_connection.h index 773554d716..c49be14e67 100644 --- a/src/lib/database/database_connection.h +++ b/src/lib/database/database_connection.h @@ -250,6 +250,7 @@ public: static DbLostCallback db_lost_callback; /// @brief Throws an exception if the connection is not usable. + /// @throw DbConnectionUnusable void checkUnusable() { if (unusable_) { isc_throw (DbConnectionUnusable, "Attempt to use an invalid connection"); @@ -257,8 +258,7 @@ public: } protected: - /// @brief Sets the usable flag to the given value. - /// @param usable new value for the flag. + /// @brief Sets the unusable flag to true. void markUnusable() { unusable_ = true; } private: @@ -272,10 +272,10 @@ private: /// @brief Indicates if the connection can no longer be used for normal /// operations. Typically a connection is marked unusable after an unrecoverable - /// DB error. There may be a time during which the connection exists after + /// DB error. There may be a time during which the connection exists after /// such an every during which it cannot be used for anything beyond checking - /// parameters and error information. This flag can be used as a guard in - /// code to prevent inadvertant use of a broken connection. + /// parameters and error information. This flag can be used as a guard in + /// code to prevent inadvertent use of a broken connection. bool unusable_; };