summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/tracking_lease_mgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dhcpsrv/tracking_lease_mgr.h')
-rw-r--r--src/lib/dhcpsrv/tracking_lease_mgr.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/tracking_lease_mgr.h b/src/lib/dhcpsrv/tracking_lease_mgr.h
index 7db4d5df1b..0aefc79e8d 100644
--- a/src/lib/dhcpsrv/tracking_lease_mgr.h
+++ b/src/lib/dhcpsrv/tracking_lease_mgr.h
@@ -156,6 +156,17 @@ protected:
/// @param lease a lease instance for which unlocking should be attempted.
void unlock(const LeasePtr& lease);
+public:
+
+ /// @brief Checks if the lease is locked.
+ ///
+ /// This function is useful in the unit tests.
+ ///
+ /// @return true if the lease is locked, false otherwise.
+ bool isLocked(const LeasePtr& lease);
+
+protected:
+
/// @brief Invokes the callbacks when a new lease is added.
///
/// It executes all callbacks of the @c TRACK_ADD_LEASE type for a subnet id of 0