]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1065] addressed review
authorRazvan Becheriu <razvan@isc.org>
Mon, 27 Jul 2020 16:37:57 +0000 (19:37 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 12 Aug 2020 06:56:43 +0000 (09:56 +0300)
src/hooks/dhcp/lease_cmds/lease_cmds.cc

index ee8d1c57540b974f09b2a24f33b70f9a456859ac..cfc6323432a0171b6d4e3b2c4ceecf88e3890ff0 100644 (file)
@@ -452,7 +452,7 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease4Ptr& existing,
                                        "assigned-addresses"),
                 int64_t(-1));
         }
-        if (existing->stateDeclined() && !lease->stateDeclined()) {
+        if (existing->stateDeclined()) {
             // old lease is declined
             StatsMgr::instance().addValue("declined-addresses", int64_t(-1));
 
@@ -469,7 +469,7 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease4Ptr& existing,
                                            "assigned-addresses"),
                     int64_t(1));
             }
-            if (lease->stateDeclined() && !existing->stateDeclined()) {
+            if (lease->stateDeclined()) {
                 // new lease is declined
                 StatsMgr::instance().addValue("declined-addresses", int64_t(1));
 
@@ -514,7 +514,7 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease6Ptr& existing,
         }
         // @node current code does not check for declined PD
         // code must be updated in parser (see @todo in lease_parser.cc)
-        if (existing->stateDeclined() && !lease->stateDeclined()) {
+        if (existing->stateDeclined()) {
             // old lease is declined
             StatsMgr::instance().addValue("declined-addresses", int64_t(-1));
 
@@ -534,7 +534,7 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease6Ptr& existing,
             }
             // @node current code does not check for declined PD
             // code must be updated in parser (see @todo in lease_parser.cc)
-            if (lease->stateDeclined() && !existing->stateDeclined()) {
+            if (lease->stateDeclined()) {
                 // new lease is declined
                 StatsMgr::instance().addValue("declined-addresses", int64_t(1));