From 799fb0de7dd7fae0d307985f6b2975c077c262d3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 24 Mar 2018 11:45:19 +1300 Subject: Fix Castel commands encoding --- src/org/traccar/protocol/CastelProtocolEncoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/CastelProtocolEncoder.java b/src/org/traccar/protocol/CastelProtocolEncoder.java index 7ba33ca6d..806dac19e 100644 --- a/src/org/traccar/protocol/CastelProtocolEncoder.java +++ b/src/org/traccar/protocol/CastelProtocolEncoder.java @@ -35,9 +35,9 @@ public class CastelProtocolEncoder extends BaseProtocolEncoder { buf.writeByte('@'); buf.writeByte('@'); - buf.writeShort(2 + 2 + 1 + 20 + content.readableBytes()); // length + buf.writeShort(2 + 2 + 1 + 20 + 2 + content.readableBytes() + 2 + 2); // length - buf.writeByte(4); // protocol version + buf.writeByte(1); // protocol version buf.writeBytes(uniqueId.getBytes(StandardCharsets.US_ASCII)); buf.writeZero(20 - uniqueId.length()); -- cgit v1.2.3