aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/FilterHandler.java9
1 files changed, 3 insertions, 6 deletions
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 ");
}