aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-02-15 11:01:15 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2020-02-15 11:01:15 -0800
commitc860f15e6a541c72d901d928941912edb943883e (patch)
treeae06ce2b2dfb3a3143284033f0827ac9efd31dcb /src/main/java/org/traccar/protocol
parent83618b94c380b2f31b65eba20ee295c824cd2726 (diff)
downloadtrackermap-server-c860f15e6a541c72d901d928941912edb943883e.tar.gz
trackermap-server-c860f15e6a541c72d901d928941912edb943883e.tar.bz2
trackermap-server-c860f15e6a541c72d901d928941912edb943883e.zip
Fix checksum calculation
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/GatorProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java
index cce23288a..087861635 100644
--- a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java
@@ -68,7 +68,7 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(checksum);
response.writeByte(type);
response.writeByte(0); // subtype
- response.writeByte(Checksum.sum(response.nioBuffer(2, response.writerIndex())));
+ response.writeByte(Checksum.xor(response.nioBuffer(2, response.writerIndex())));
response.writeByte(0x0D);
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}