aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-25 19:16:08 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-25 19:16:33 +1200
commit9a597a7f902eea46405a345d4398139c13f69655 (patch)
treed88a6f51bb56c7a7619924fc0c4744a28a788893 /src/org
parent3a24bd121c34d4046a765cd2a55e4847df423c89 (diff)
downloadtrackermap-server-9a597a7f902eea46405a345d4398139c13f69655.tar.gz
trackermap-server-9a597a7f902eea46405a345d4398139c13f69655.tar.bz2
trackermap-server-9a597a7f902eea46405a345d4398139c13f69655.zip
Consider attributes in duplicate filter (fix #3285)
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/FilterHandler.java10
1 files changed, 9 insertions, 1 deletions
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) {