summaryrefslogtreecommitdiffstats
path: root/src/lib/hooks/hooks_manager.h
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2018-05-16 14:42:55 +0200
committerTomek Mrugalski <tomasz@isc.org>2018-05-16 14:42:55 +0200
commit92e83eb2c8a3b66cee42dba3d8a74fa056f51378 (patch)
treea28b526890c979a88a9c0532351a5e46b1c21302 /src/lib/hooks/hooks_manager.h
parent[5564] Servers dump cached and parked packets on reconfig and shutdown (diff)
downloadkea-92e83eb2c8a3b66cee42dba3d8a74fa056f51378.tar.xz
kea-92e83eb2c8a3b66cee42dba3d8a74fa056f51378.zip
[5564] Changes after review:
- dumpPackets renamed to discardPackets - added missing comments
Diffstat (limited to '')
-rw-r--r--src/lib/hooks/hooks_manager.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/hooks/hooks_manager.h b/src/lib/hooks/hooks_manager.h
index b31bce34e8..903ad6aa6e 100644
--- a/src/lib/hooks/hooks_manager.h
+++ b/src/lib/hooks/hooks_manager.h
@@ -310,6 +310,11 @@ public:
getHooksManager().referenceInternal(hook_name, parked_object);
}
+ /// @brief Clears any parking packets.
+ ///
+ /// This method should be called during reconfiguration to ensure there
+ /// are no dangling pointers that could possibly prevent the library
+ /// from being unloaded.
static void clearParkingLots() {
getHooksManager().clearParkingLotsInternal();
}
@@ -371,6 +376,9 @@ private:
getParkingLotPtr(hook_name)->reference(parked_object);
}
+ /// @brief Clears all pointers stored in parking lots.
+ ///
+ /// See @ref clearParkingLots for explanation.
void clearParkingLotsInternal() {
ServerHooks::getServerHooks().getParkingLotsPtr()->clear();
}