aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SatsolProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-01-29 00:09:53 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-01-29 00:09:53 -0800
commitab9695473fa48c97de0ca1364fac08d76a771bf4 (patch)
treed4513ecfbe535365b845b039487667b258c07c12 /src/org/traccar/protocol/SatsolProtocolDecoder.java
parent315cc87d46b926c8e2477a162d63bfd65248cfa8 (diff)
downloadtrackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.tar.gz
trackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.tar.bz2
trackermap-server-ab9695473fa48c97de0ca1364fac08d76a771bf4.zip
Fix response message
Diffstat (limited to 'src/org/traccar/protocol/SatsolProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/SatsolProtocolDecoder.java10
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));
}