From 132c672081947776c72a4bfed4112b771c45637d Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 29 Aug 2017 08:57:13 +0500 Subject: Correct filter Limit --- src/org/traccar/FilterHandler.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java index 91fbac68f..bcc958e59 100644 --- a/src/org/traccar/FilterHandler.java +++ b/src/org/traccar/FilterHandler.java @@ -147,10 +147,6 @@ public class FilterHandler extends BaseDataHandler { private boolean filter(Position position) { - if (keepAlarms && position.getAttributes().containsKey(Position.KEY_ALARM)) { - return false; - } - StringBuilder filterType = new StringBuilder(); Position last = null; @@ -158,9 +154,10 @@ public class FilterHandler extends BaseDataHandler { last = Context.getIdentityManager().getLastPosition(position.getDeviceId()); } - if (filterLimit(position, last)) { - filterType.append("Limit "); + if (filterLimit(position, last) || keepAlarms && position.getAttributes().containsKey(Position.KEY_ALARM)) { + return false; } + if (filterInvalid(position)) { filterType.append("Invalid "); } -- cgit v1.2.3