commit | bd1472dc540d5aa61d4dd9bf7b4705cf5ff7f3d8 | [log] [tgz] |
---|---|---|
author | Daniel Ginsburg <daniel.ginsburg@harmonicinc.com> | Wed May 16 08:02:06 2018 +0300 |
committer | Thomas Vachuska <tom@opennetworking.org> | Mon May 21 17:19:27 2018 +0000 |
tree | 713ff5d92b4fca8c326b1c45616064f8acf22d28 | |
parent | 9ba9e82813c8c903ac686fd00e3ff2d01049aa8c [diff] |
Make sure that HostLocation's timestamp is updated Make sure that the most recent timestamp of location is recorded in DhcpStore when this location is already present in locations set. Change-Id: Idfc768d9812ef3cb01cc8a7a3d7778a3e3bd5caf
diff --git a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java index e4c2673..f0beff9 100644 --- a/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java +++ b/apps/dhcprelay/src/main/java/org/onosproject/dhcprelay/store/DhcpRecord.java
@@ -95,6 +95,9 @@ * @return the DHCP record */ public DhcpRecord addLocation(HostLocation location) { + if (locations.contains(location)) { + locations.remove(location); + } locations.add(location); return this; }