From d14cef37937fb64aa54cb497d51afd47b2798fb3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 6 Jul 2016 10:01:35 +1200 Subject: Fix HuaSheng acknowledgement message --- src/org/traccar/protocol/HuaShengProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/HuaShengProtocolDecoder.java b/src/org/traccar/protocol/HuaShengProtocolDecoder.java index ef23f9fc4..6743db47d 100644 --- a/src/org/traccar/protocol/HuaShengProtocolDecoder.java +++ b/src/org/traccar/protocol/HuaShengProtocolDecoder.java @@ -41,8 +41,8 @@ public class HuaShengProtocolDecoder extends BaseProtocolDecoder { ChannelBuffer response = ChannelBuffers.dynamicBuffer(); response.writeByte(0xC0); response.writeShort(0x0100); - response.writeShort(response.capacity()); // TODO: length - response.writeByte(type); + response.writeShort(12 + content.readableBytes()); + response.writeShort(type); response.writeShort(0); response.writeInt(1); response.writeBytes(content); -- cgit v1.2.3