From 9a597a7f902eea46405a345d4398139c13f69655 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 25 Jun 2017 19:16:08 +1200 Subject: Consider attributes in duplicate filter (fix #3285) --- src/org/traccar/FilterHandler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java index 973dfc205..9e532347d 100644 --- a/src/org/traccar/FilterHandler.java +++ b/src/org/traccar/FilterHandler.java @@ -93,7 +93,15 @@ public class FilterHandler extends BaseDataHandler { } private boolean filterDuplicate(Position position, Position last) { - return filterDuplicate && last != null && position.getFixTime().equals(last.getFixTime()); + if (filterDuplicate && last != null && position.getFixTime().equals(last.getFixTime())) { + for (String key : position.getAttributes().keySet()) { + if (!last.getAttributes().containsKey(key)) { + return false; + } + } + return true; + } + return false; } private boolean filterFuture(Position position) { -- cgit v1.2.3