aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-12-29 20:55:49 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-12-29 20:55:49 -0800
commitea5d34b5102e75557668f85c6f3124ea5417a219 (patch)
tree19c6e29d75b732d4a350ad8886c3e7fda9707c81 /src
parent407147946a7c1a49242a78227351605c2ece9e32 (diff)
downloadtrackermap-server-ea5d34b5102e75557668f85c6f3124ea5417a219.tar.gz
trackermap-server-ea5d34b5102e75557668f85c6f3124ea5417a219.tar.bz2
trackermap-server-ea5d34b5102e75557668f85c6f3124ea5417a219.zip
Fix protocol response
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
index bdcc12c4c..8314442a3 100644
--- a/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NavtelecomProtocolDecoder.java
@@ -235,12 +235,11 @@ public class NavtelecomProtocolDecoder extends BaseProtocolDecoder {
positions.add(position);
}
- int checksum = buf.readUnsignedByte();
if (channel != null) {
ByteBuf response = Unpooled.buffer();
response.writeCharSequence(type, StandardCharsets.US_ASCII);
response.writeByte(count);
- response.writeByte(checksum);
+ response.writeByte(Checksum.xor(response.nioBuffer()));
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}