From ab9695473fa48c97de0ca1364fac08d76a771bf4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 Jan 2019 00:09:53 -0800 Subject: Fix response message --- src/org/traccar/protocol/SatsolProtocolDecoder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/traccar/protocol/SatsolProtocolDecoder.java b/src/org/traccar/protocol/SatsolProtocolDecoder.java index e9e8e4c56..b12a81a52 100644 --- a/src/org/traccar/protocol/SatsolProtocolDecoder.java +++ b/src/org/traccar/protocol/SatsolProtocolDecoder.java @@ -89,11 +89,11 @@ public class SatsolProtocolDecoder extends BaseProtocolDecoder { if (channel != null) { ByteBuf response = Unpooled.buffer(); - buf.writeShortLE(0); - buf.writeShortLE(0x4CBF); // preamble - buf.writeIntLE((int) id); - buf.writeShortLE(0); - buf.setShortLE(0, Checksum.crc16( + response.writeShortLE(0); + response.writeShortLE(0x4CBF); // preamble + response.writeIntLE((int) id); + response.writeShortLE(0); + response.setShortLE(0, Checksum.crc16( Checksum.CRC16_CCITT_FALSE, response.nioBuffer(2, response.readableBytes() - 2))); channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } -- cgit v1.2.3