diff options
author | Anton Tananaev <anton@traccar.org> | 2024-04-23 18:32:22 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2024-04-23 18:32:22 -0700 |
commit | 8986af8e65cf92c8cb5daa66a0e852e891dacf2b (patch) | |
tree | e16a192d31fcfa8e30e9dea8738cc3299326eb12 /src/main/java/org/traccar/protocol | |
parent | 35ae557526d8613e9658375e7f846e644fca4d83 (diff) | |
download | trackermap-server-8986af8e65cf92c8cb5daa66a0e852e891dacf2b.tar.gz trackermap-server-8986af8e65cf92c8cb5daa66a0e852e891dacf2b.tar.bz2 trackermap-server-8986af8e65cf92c8cb5daa66a0e852e891dacf2b.zip |
Fix Snapper protocol response
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java index 5e513d954..25cc1a431 100644 --- a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java @@ -66,13 +66,13 @@ public class SnapperProtocolDecoder extends BaseProtocolDecoder { ByteBuf response = Unpooled.buffer(); response.writeByte('K'); response.writeByte(3); // protocol version - response.writeIntLE(0); // reserved - response.writeIntLE(0); // reserved + response.writeLongLE(0); // reserved response.writeShortLE(0); // encryption + response.writeIntLE(0); // reserved response.writeIntLE(answer.length()); response.writeShortLE(index); response.writeByte(Checksum.sum(ByteBuffer.wrap(answer.getBytes(StandardCharsets.US_ASCII)))); - response.writeByte(type); + response.writeShortLE(type); response.writeCharSequence(answer, StandardCharsets.US_ASCII); channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } |