]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2559] Add debug message when database is closed
authorStephen Morris <stephen@isc.org>
Fri, 11 Jan 2013 08:37:15 +0000 (08:37 +0000)
committerStephen Morris <stephen@isc.org>
Fri, 11 Jan 2013 08:37:15 +0000 (08:37 +0000)
src/lib/dhcpsrv/dhcpsrv_messages.mes
src/lib/dhcpsrv/lease_mgr_factory.cc

index 27f12fc947f64d901695b2ec3f14a53505dfa096..ee057dfec81dcb4c4b70418edcc14c8e2c9eff71 100644 (file)
@@ -60,6 +60,13 @@ This is a debug message reporting that the DHCP configuration manager has
 returned the specified IPv6 subnet when given the address hint specified
 as the address is within the subnet.
 
+% DHCPSRV_CLOSE_DB closing currently open %1 database
+This is a debug message, issues when the DHCP server closed the currently
+open lease database.  It is issued at program shutdown, and whenever
+the database access parameters are changed: in the latter case, the
+server closes the currently open database, and opens a database using
+the new parameters.
+
 % DHCPSRV_INVALID_ACCESS invalid database access string: %1
 This is logged when an attempt has been made to parse a database access string
 and the attempt ended in error.  The access string in question - which
index 9fd276d9ac14d1f81a54d50be3845a10be0674db..ad31d125f2d96d92df8e931af7a0af3aaa22c405 100644 (file)
@@ -141,6 +141,12 @@ LeaseMgrFactory::create(const std::string& dbaccess) {
 
 void
 LeaseMgrFactory::destroy() {
+    // Destroy current lease manager.  This is a no-op if no lease manager
+    // is available.
+    if (getLeaseMgrPtr()) {
+        LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE, DHCPSRV_CLOSE_DB)
+            .arg(getLeaseMgrPtr()->getType());
+    }
     getLeaseMgrPtr().reset();
 }