diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-01-29 00:09:53 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-01-29 00:09:53 -0800 |
commit | ab9695473fa48c97de0ca1364fac08d76a771bf4 (patch) | |
tree | d4513ecfbe535365b845b039487667b258c07c12 | |
parent | 315cc87d46b926c8e2477a162d63bfd65248cfa8 (diff) | |
download | trackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.tar.gz trackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.tar.bz2 trackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.zip |
Fix response message
-rw-r--r-- | src/org/traccar/protocol/SatsolProtocolDecoder.java | 10 |
1 files 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)); } |