From: Francis Dupont Date: Mon, 4 Nov 2019 19:41:24 +0000 (+0100) Subject: [894-make-memfile-thread-safe] Finished update X-Git-Tag: Kea-1.7.4~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb60de548cf5506de038ea6cb45679321e07c54d;p=thirdparty%2Fkea.git [894-make-memfile-thread-safe] Finished update --- diff --git a/src/lib/dhcpsrv/memfile_lease_mgr.cc b/src/lib/dhcpsrv/memfile_lease_mgr.cc index 2b0b7501b6..48d7f93bae 100644 --- a/src/lib/dhcpsrv/memfile_lease_mgr.cc +++ b/src/lib/dhcpsrv/memfile_lease_mgr.cc @@ -969,12 +969,9 @@ Memfile_LeaseMgr::getLeases4(SubnetID subnet_id) const { return (collection); } -Lease4Collection -Memfile_LeaseMgr::getLeases4(const std::string& hostname) const { - LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MEMFILE_GET_HOSTNAME4) - .arg(hostname); - - Lease4Collection collection; +void +Memfile_LeaseMgr::getLeases4Internal(const std::string& hostname, + Lease4Collection& collection) const { const Lease4StorageHostnameIndex& idx = storage4_.get(); std::pair l = @@ -983,8 +980,6 @@ Memfile_LeaseMgr::getLeases4(const std::string& hostname) const { for (auto lease = l.first; lease != l.second; ++lease) { collection.push_back(Lease4Ptr(new Lease4(**lease))); } - - return (collection); } Lease4Collection @@ -1205,12 +1200,9 @@ Memfile_LeaseMgr::getLeases6(SubnetID subnet_id) const { return (collection); } -Lease6Collection -Memfile_LeaseMgr::getLeases6(const std::string& hostname) const { - LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, DHCPSRV_MEMFILE_GET_HOSTNAME6) - .arg(hostname); - - Lease6Collection collection; +void +Memfile_LeaseMgr::getLeases6Internal(const std::string& hostname, + Lease6Collection& collection) const { const Lease6StorageHostnameIndex& idx = storage6_.get(); std::pair l = @@ -1219,8 +1211,6 @@ Memfile_LeaseMgr::getLeases6(const std::string& hostname) const { for (auto lease = l.first; lease != l.second; ++lease) { collection.push_back(Lease6Ptr(new Lease6(**lease))); } - - return (collection); } Lease6Collection