summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcpsrv/lease.cc
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2015-09-18 18:07:39 +0200
committerTomek Mrugalski <tomasz@isc.org>2015-09-18 18:07:39 +0200
commit795863a7ee30b7cef5c56511363f30067b5d876e (patch)
treee4eb678d3ee7fb982744eb12c3f74976078203db /src/lib/dhcpsrv/lease.cc
parent[3981] Merge branch 'trac3981' of ssh://git.kea.isc.org/git/kea into trac3981 (diff)
downloadkea-795863a7ee30b7cef5c56511363f30067b5d876e.tar.xz
kea-795863a7ee30b7cef5c56511363f30067b5d876e.zip
[3981] Changes after review:
- moved lease decline to Lease::decline()
Diffstat (limited to 'src/lib/dhcpsrv/lease.cc')
-rw-r--r--src/lib/dhcpsrv/lease.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/dhcpsrv/lease.cc b/src/lib/dhcpsrv/lease.cc
index 9e57408faf..2320e51d74 100644
--- a/src/lib/dhcpsrv/lease.cc
+++ b/src/lib/dhcpsrv/lease.cc
@@ -179,6 +179,20 @@ Lease4::belongsToClient(const HWAddrPtr& hw_address,
return (false);
}
+void
+Lease4::decline(uint32_t probation_period) {
+ hwaddr_.reset(new HWAddr());
+ client_id_.reset();
+ t1_ = 0;
+ t2_ = 0;
+ cltt_ = time(NULL);
+ hostname_ = string("");
+ fqdn_fwd_ = false;
+ fqdn_rev_ = false;
+ state_ = STATE_DECLINED;
+ valid_lft_ = probation_period;
+}
+
Lease4&
Lease4::operator=(const Lease4& other) {
if (this != &other) {
@@ -261,6 +275,11 @@ Lease6::getDuidVector() const {
return (duid_->getDuid());
}
+void
+Lease6::decline(uint32_t ) {
+ /// @todo: implement this
+}
+
std::string
Lease6::toText() const {
ostringstream stream;