aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-08-29 08:57:13 +0500
committerAbyss777 <abyss@fox5.ru>2017-08-29 09:37:49 +0500
commit132c672081947776c72a4bfed4112b771c45637d (patch)
treec2915336f932c0660b604800253647431986f3bf /src/org/traccar
parent57d2621cdf5e318a236b036a9435358121a4adf5 (diff)
downloadtrackermap-server-132c672081947776c72a4bfed4112b771c45637d.tar.gz
trackermap-server-132c672081947776c72a4bfed4112b771c45637d.tar.bz2
trackermap-server-132c672081947776c72a4bfed4112b771c45637d.zip
Correct filter Limit
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 ");
}