]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3295] addressed review
authorRazvan Becheriu <razvan@isc.org>
Tue, 2 Apr 2024 05:31:46 +0000 (08:31 +0300)
committerRazvan Becheriu <razvan@isc.org>
Tue, 2 Apr 2024 05:31:46 +0000 (08:31 +0300)
src/bin/d2/d2_update_mgr.cc
src/bin/d2/d2_update_mgr.h
src/bin/d2/tests/d2_update_mgr_unittests.cc

index 6be805b4738ce2b1465178449bc2a0bcb34439e2..711d3a9ae37e54a8add3ea7b8da4424ab9e5f2b6 100644 (file)
@@ -60,7 +60,7 @@ void D2UpdateMgr::sweep() {
     // start one new transaction per invocation.  On the other hand a busy
     // system will generate many IO events and this method will be called
     // frequently.  It will likely achieve max transactions quickly on its own.
-    if (getQueueCount() > 0)  {
+    if (getQueueCount() > 0) {
         if (getTransactionCount() >= max_transactions_) {
             LOG_DEBUG(dhcp_to_d2_logger, isc::log::DBGLVL_TRACE_DETAIL_DATA,
                       DHCP_DDNS_AT_MAX_TRANSACTIONS).arg(getQueueCount())
@@ -88,7 +88,7 @@ D2UpdateMgr::checkFinishedTransactions() {
     while (it != transaction_list_.end()) {
         NameChangeTransactionPtr trans = (*it).second;
         if (trans->isModelDone()) {
-            // @todo  Additional actions based on NCR status could be
+            // @todo Additional actions based on NCR status could be
             // performed here.
             transaction_list_.erase(it++);
         } else {
@@ -100,7 +100,7 @@ D2UpdateMgr::checkFinishedTransactions() {
 void D2UpdateMgr::pickNextJob() {
     // Start at the front of the queue, looking for the first entry for
     // which no transaction is in progress.  If we find an eligible entry
-    // remove it from the queue and  make a transaction for it.  If the
+    // remove it from the queue and make a transaction for it.  If the
     // transaction creation fails try the next entry in the queue.
     // Requests and transactions are associated by DHCID.  If a request has
     // the same DHCID as a transaction, they are presumed to be for the same
index 870440144cb34f4c371c11ea04e0f0197e0f5903..ee2cdd0bf33157ffc2b5fbba952a22040d660fd5 100644 (file)
@@ -46,7 +46,7 @@ typedef std::map<TransactionKey, NameChangeTransactionPtr> TransactionList;
 /// transactions.
 ///
 /// As part of the process of forming transactions, D2UpdateMgr matches each
-/// request with the appropriate list of DNS servers.  This matching is  based
+/// request with the appropriate list of DNS servers.  This matching is based
 /// upon request attributes, primarily the FQDN and update direction (forward
 /// or reverse).  D2UpdateMgr uses the services of D2CfgMgr to match requests
 /// to DNS server lists.
@@ -54,7 +54,7 @@ typedef std::map<TransactionKey, NameChangeTransactionPtr> TransactionList;
 /// Once created, each transaction is responsible for carrying out the steps
 /// required to fulfill its specific request.  These steps typically consist of
 /// one or more DNS packet exchanges with the appropriate DNS server.  As
-/// transactions complete,  D2UpdateMgr removes them from the transaction list,
+/// transactions complete, D2UpdateMgr removes them from the transaction list,
 /// replacing them with new transactions.
 ///
 /// D2UpdateMgr carries out each of the above steps, with a method called
index ec8a2d957bd890fbe13fd5bac297498fa53fca5a..0360a299c85a2f384a504a5eaf3789c3a9f455b1 100644 (file)
@@ -133,7 +133,7 @@ public:
                   " \"ddns-domains\": [ "
                   "  { \"name\": \"example.com.\" , "
                   "   \"dns-servers\" : [ "
-                  "    { \"ip-address\": \"127.0.0.1\", \"port\" : 5301  } "
+                  "    { \"ip-address\": \"127.0.0.1\", \"port\" : 5301 } "
                   "   ] },"
                   "  { \"name\": \"org.\" , "
                   "   \"dns-servers\" : [ "
@@ -241,7 +241,7 @@ public:
             // test (currently, multiTransactionTimeout).
             if (passes > max_passes) {
                 FAIL() << "processALL failed, too many passes: "
-                       << passes <<  ", total handlers executed: " << handlers;
+                       << passes << ", total handlers executed: " << handlers;
             }
         }
     }
@@ -293,7 +293,7 @@ TEST(D2UpdateMgr, construction) {
               update_mgr->getMaxTransactions());
 
 
-    // Verify that constructor permits custom  max transactions.
+    // Verify that constructor permits custom max transactions.
     ASSERT_NO_THROW(update_mgr.reset(new D2UpdateMgr(queue_mgr, cfg_mgr,
                                                      io_service, 100)));
 
@@ -530,7 +530,7 @@ TEST_F(D2UpdateMgrTest, pickNextJob) {
     // Verify that the queue has been drained.
     EXPECT_EQ(0, update_mgr_->getQueueCount());
 
-    // Now verify that a subsequent request for a DCHID  for which a
+    // Now verify that a subsequent request for a DCHID for which a
     // transaction is in progress, is not dequeued.
     // First add the "subsequent" request.
     dhcp_ddns::NameChangeRequestPtr