aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index b6dea49e5..fc7b88b08 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -47,7 +47,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
private void sendResponse(Channel channel, short header, int type, int index, ByteBuf imei, int alarm) {
if (channel != null) {
- ByteBuf response = Unpooled.buffer(15);
+ ByteBuf response = Unpooled.buffer(alarm > 0 ? 16 : 15);
response.writeShort(header);
response.writeByte(type);
response.writeShort(response.capacity()); // length