aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-04-25 10:22:07 -0700
committerAnton Tananaev <anton@traccar.org>2024-04-25 10:22:07 -0700
commit660b455a2aa7995cf1c852f897bbfd9522f72ded (patch)
tree3837f12be70c5ced207efd6281ad462647dab9b8 /src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
parent8986af8e65cf92c8cb5daa66a0e852e891dacf2b (diff)
downloadtrackermap-server-660b455a2aa7995cf1c852f897bbfd9522f72ded.tar.gz
trackermap-server-660b455a2aa7995cf1c852f897bbfd9522f72ded.tar.bz2
trackermap-server-660b455a2aa7995cf1c852f897bbfd9522f72ded.zip
Fix Snapper protocol response
Diffstat (limited to 'src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
index 25cc1a431..e60ddc431 100644
--- a/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/SnapperProtocolDecoder.java
@@ -68,8 +68,8 @@ public class SnapperProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(3); // protocol version
response.writeLongLE(0); // reserved
response.writeShortLE(0); // encryption
- response.writeIntLE(0); // reserved
response.writeIntLE(answer.length());
+ response.writeIntLE(0); // reserved
response.writeShortLE(index);
response.writeByte(Checksum.sum(ByteBuffer.wrap(answer.getBytes(StandardCharsets.US_ASCII))));
response.writeShortLE(type);