aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-03 18:59:28 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-03 18:59:28 -0700
commit812e581d62a188916ca0da02c30739122e48b036 (patch)
treec183f21df8e1dbe5f25ce56415e3842154a6f261 /src/main/java/org
parentab4f951c53e4e6ee15637d78943d538d0c68be51 (diff)
downloadtraccar-server-812e581d62a188916ca0da02c30739122e48b036.tar.gz
traccar-server-812e581d62a188916ca0da02c30739122e48b036.tar.bz2
traccar-server-812e581d62a188916ca0da02c30739122e48b036.zip
Update response message size
Diffstat (limited to 'src/main/java/org')
-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