]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[960-mysql-connection-pool] Post rebase fixes
authorFrancis Dupont <fdupont@isc.org>
Mon, 4 Nov 2019 16:26:27 +0000 (17:26 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 4 Nov 2019 16:26:27 +0000 (17:26 +0100)
src/lib/dhcpsrv/mysql_lease_mgr.cc

index fe39c73ed9a8e38adda519d16e39a18151aa9b4a..41481cea50b94df5438653ad3fddbe5e0c579d0e 100644 (file)
@@ -2223,7 +2223,12 @@ MySqlLeaseMgr::getLeases4(const string& hostname) const {
 
     // ... and get the data
     Lease4Collection result;
-    getLeaseCollection(GET_LEASE4_HOSTNAME, inbind, result);
+
+    // Get a context
+    MySqlLeaseContextAlloc get_context(*this);
+    MySqlLeaseContextPtr ctx = get_context.ctx_;
+
+    getLeaseCollection(ctx, GET_LEASE4_HOSTNAME, inbind, result);
 
     return (result);
 }
@@ -2520,7 +2525,12 @@ MySqlLeaseMgr::getLeases6(const string& hostname) const {
 
     // ... and get the data
     Lease6Collection result;
-    getLeaseCollection(GET_LEASE6_HOSTNAME, inbind, result);
+
+    // Get a context
+    MySqlLeaseContextAlloc get_context(*this);
+    MySqlLeaseContextPtr ctx = get_context.ctx_;
+
+    getLeaseCollection(ctx, GET_LEASE6_HOSTNAME, inbind, result);
 
     return (result);
 }