Skip to content

Commit 71e03c6

Browse files
committed
[#3649] Fixed comments
1 parent 674b22c commit 71e03c6

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/hooks/dhcp/high_availability/ha_impl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ HAImpl::lease4Expire(CalloutHandle& callout_handle) {
350350
if (!subnet4) {
351351
// No subnet means that we possibly have some stale leases that don't
352352
// really belong to us. Therefore, there we return early and rely on the
353-
// DHCP server to reclaim them. The HA hook has no way to juristiction here.
353+
// DHCP server to reclaim them. The HA hook has no jurisdiction here.
354354
return;
355355
}
356356

@@ -631,7 +631,7 @@ HAImpl::lease6Expire(CalloutHandle& callout_handle) {
631631
if (!subnet6) {
632632
// No subnet means that we possibly have some stale leases that don't
633633
// really belong to us. Therefore, there we return early and rely on the
634-
// DHCP server to reclaim them. The HA hook has no way to juristiction here.
634+
// DHCP server to reclaim them. The HA hook has no jurisdiction here.
635635
return;
636636
}
637637

src/hooks/dhcp/high_availability/tests/ha_impl_unittest.cc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,17 @@ class TestHAImpl : public HAImpl {
8585

8686
/// @brief Mock function checking if the lease should be reclaimed by this server.
8787
///
88-
/// @param service pointer to the HA service to which the lease belongs.
89-
/// @param lease4 pointer to the DHCPv4 lease being reclaimed.
9088
/// @return true if the DHCPv4 lease should be reclaimed by this server instance,
9189
/// false otherwise.
92-
virtual bool shouldReclaim(const HAServicePtr& service, const Lease4Ptr& lease4) const {
90+
virtual bool shouldReclaim(const HAServicePtr& /*service*/, const Lease4Ptr& /*lease4*/) const {
9391
return (should_reclaim_dhcpv4_lease_);
9492
}
9593

9694
/// @brief Mock function checking if the lease should be reclaimed by this server.
9795
///
98-
/// @param service pointer to the HA service to which the lease belongs.
99-
/// @param lease6 pointer to the DHCPv4 lease being reclaimed.
10096
/// @return true if the DHCPv6 lease should be reclaimed by this server instance,
10197
/// false otherwise.
102-
virtual bool shouldReclaim(const HAServicePtr& service, const Lease6Ptr& lease6) const {
98+
virtual bool shouldReclaim(const HAServicePtr& /*service*/, const Lease6Ptr& /*lease6*/) const {
10399
return (should_reclaim_dhcpv6_lease_);
104100
}
105101

@@ -1734,6 +1730,8 @@ TEST_F(HAImplTest, lease4ExpireHubNoSubnet) {
17341730
lease4->subnet_id_ = 7;
17351731
callout_handle->setArgument("lease4", lease4);
17361732

1733+
// Reclamation should continue because this server's jurisdiction is
1734+
// indeterminate.
17371735
test_ha_impl_->should_reclaim_dhcpv4_lease_ = false;
17381736
ASSERT_NO_THROW(test_ha_impl_->lease4Expire(*callout_handle));
17391737
EXPECT_EQ(CalloutHandle::NEXT_STEP_CONTINUE, callout_handle->getStatus());

0 commit comments

Comments
 (0)