aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-01 21:59:48 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-01 21:59:48 -0700
commit0d491bc058de127bbcc8c014fe9a18e89544f1bb (patch)
tree70bdd57cb74de07642b716ea57528b52bcd793fc /src/main/java
parent1af92658dc079970ae4505c0503ba96723e65344 (diff)
downloadtrackermap-server-0d491bc058de127bbcc8c014fe9a18e89544f1bb.tar.gz
trackermap-server-0d491bc058de127bbcc8c014fe9a18e89544f1bb.tar.bz2
trackermap-server-0d491bc058de127bbcc8c014fe9a18e89544f1bb.zip
Ignore empty locations (fix #4687)
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
index 2bfc08c75..ad7dfa886 100644
--- a/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -179,6 +179,9 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
dateBuilder.setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
position.setTime(dateBuilder.getDate());
+
+ } else {
+ continue;
}
} else if (message.contains("$WIFI")) {
@@ -220,7 +223,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
positions.add(position);
}
- return positions;
+ return positions.isEmpty() ? null : positions;
}
}