aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-30 22:17:02 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-30 22:17:02 -0700
commit94d95ebeb1168ff235aa49a24c0ba0ed62b1125b (patch)
treec443b3ab52b045845d6c4d8149cc31aca8087235 /src/main/java/org
parent08d7ce0017f7113f3db961ae19cae7b85e386278 (diff)
downloadtrackermap-server-94d95ebeb1168ff235aa49a24c0ba0ed62b1125b.tar.gz
trackermap-server-94d95ebeb1168ff235aa49a24c0ba0ed62b1125b.tar.bz2
trackermap-server-94d95ebeb1168ff235aa49a24c0ba0ed62b1125b.zip
Ignore keepalive messages
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/UuxProtocolDecoder.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java b/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java
index 545784865..1081fa811 100644
--- a/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java
@@ -40,6 +40,7 @@ public class UuxProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_IMMOBILIZER = 0x9E;
public static final int MSG_ACK = 0xD0;
public static final int MSG_NACK = 0xF0;
+ public static final int MSG_KEEPALIVE = 0xFF;
private void sendResponse(Channel channel, int productCode, int protocolVersion, int type) {
if (channel != null && BitUtil.check(protocolVersion, 7)) {
@@ -71,6 +72,10 @@ public class UuxProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedByte(); // length
int type = buf.readUnsignedByte();
+ if (type == MSG_KEEPALIVE) {
+ return null;
+ }
+
String vehicleId = buf.readCharSequence(10, StandardCharsets.US_ASCII).toString();
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, vehicleId);
if (deviceSession == null) {