aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-02-24 15:00:29 -0800
committerAnton Tananaev <anton@traccar.org>2023-02-24 15:00:29 -0800
commit5b77d6297eaf171595ca0eedb50e434eb073c8ac (patch)
tree0957a806f95907c3464f1dbe1b98ce70b0b30ae7 /src/main/java/org
parenta88fec16c1b8b2c3592e9d0a8b52ada6e038a81a (diff)
downloadtrackermap-server-5b77d6297eaf171595ca0eedb50e434eb073c8ac.tar.gz
trackermap-server-5b77d6297eaf171595ca0eedb50e434eb073c8ac.tar.bz2
trackermap-server-5b77d6297eaf171595ca0eedb50e434eb073c8ac.zip
Configurable TopFly responses
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index 6e09e6e3b..758716d23 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2023 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,8 @@ import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
+import org.traccar.config.Keys;
+import org.traccar.helper.model.AttributeUtil;
import org.traccar.session.DeviceSession;
import org.traccar.NetworkMessage;
import org.traccar.Protocol;
@@ -511,7 +513,9 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
}
}
- if (type == MSG_ALARM || type == MSG_ALARM_2) {
+ boolean acknowledgement = AttributeUtil.lookup(
+ getCacheManager(), Keys.PROTOCOL_ACK.withPrefix(getProtocolName()), deviceSession.getDeviceId());
+ if (acknowledgement || type == MSG_ALARM || type == MSG_ALARM_2) {
sendResponse(channel, header, type, index, imei, alarm);
}