2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[2546] Remove LeaseMgr::getLease4(address, subnetid)

As the address is th eprimary key of the table, there can only ever
be at most one lease in the database with a given address.  Additional
selection by subnet ID is not needed.
This commit is contained in:
Stephen Morris
2012-12-10 10:13:53 +00:00
parent 93eddf78d2
commit 084a166845
7 changed files with 0 additions and 108 deletions

View File

@@ -1274,24 +1274,6 @@ MySqlLeaseMgr::getLease4(const isc::asiolink::IOAddress& addr) const {
}
Lease4Ptr
MySqlLeaseMgr::getLease4(const isc::asiolink::IOAddress& addr,
SubnetID subnet_id) const {
// As the address is the unique primary key of the lease4 table, there can
// only be one lease with a given address. Therefore we will get that
// lease and do the filtering on subnet ID here.
Lease4Ptr result = getLease4(addr);
if (result && (result->subnet_id_ != subnet_id)) {
// Lease found but IDs do not match. Return null pointer
result.reset();
}
return (result);
}
Lease4Collection
MySqlLeaseMgr::getLease4(const HWAddr& hwaddr) const {
// Set up the WHERE clause value