From 812e581d62a188916ca0da02c30739122e48b036 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 3 Apr 2019 18:59:28 -0700 Subject: Update response message size --- src/main/java/org/traccar/protocol/T800xProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') 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 -- cgit v1.2.3