aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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));
}