Commit 5d862c3b authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[5328] Updated commentary in Memfile_LeaseMgr.

parent ba759f69
...@@ -638,6 +638,9 @@ Memfile_LeaseMgr::getLease4(const HWAddr& hwaddr) const { ...@@ -638,6 +638,9 @@ Memfile_LeaseMgr::getLease4(const HWAddr& hwaddr) const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
DHCPSRV_MEMFILE_GET_HWADDR).arg(hwaddr.toText()); DHCPSRV_MEMFILE_GET_HWADDR).arg(hwaddr.toText());
Lease4Collection collection; Lease4Collection collection;
// Using composite index by 'hw address' and 'subnet id'. It is
// ok to use it for searching by the 'hw address' only.
const Lease4StorageHWAddressSubnetIdIndex& idx = const Lease4StorageHWAddressSubnetIdIndex& idx =
storage4_.get<HWAddressSubnetIdIndexTag>(); storage4_.get<HWAddressSubnetIdIndexTag>();
std::pair<Lease4StorageHWAddressSubnetIdIndex::const_iterator, std::pair<Lease4StorageHWAddressSubnetIdIndex::const_iterator,
...@@ -677,6 +680,8 @@ Memfile_LeaseMgr::getLease4(const ClientId& client_id) const { ...@@ -677,6 +680,8 @@ Memfile_LeaseMgr::getLease4(const ClientId& client_id) const {
LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL, LOG_DEBUG(dhcpsrv_logger, DHCPSRV_DBG_TRACE_DETAIL,
DHCPSRV_MEMFILE_GET_CLIENTID).arg(client_id.toText()); DHCPSRV_MEMFILE_GET_CLIENTID).arg(client_id.toText());
Lease4Collection collection; Lease4Collection collection;
// Using composite index by 'client id' and 'subnet id'. It is ok
// to use it to search by 'client id' only.
const Lease4StorageClientIdSubnetIdIndex& idx = const Lease4StorageClientIdSubnetIdIndex& idx =
storage4_.get<ClientIdSubnetIdIndexTag>(); storage4_.get<ClientIdSubnetIdIndexTag>();
std::pair<Lease4StorageClientIdSubnetIdIndex::const_iterator, std::pair<Lease4StorageClientIdSubnetIdIndex::const_iterator,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment