aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-25 21:29:29 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-25 21:29:29 -0800
commit5b31bf8322c7f6bdef3880a9aff09c8d0253601b (patch)
treefbc93b14023639eb9fcf509391ae3b9ae3f401d3
parent01e0702d64330d6862dfb94816d2bfaf2d9f4eeb (diff)
downloadtrackermap-server-5b31bf8322c7f6bdef3880a9aff09c8d0253601b.tar.gz
trackermap-server-5b31bf8322c7f6bdef3880a9aff09c8d0253601b.tar.bz2
trackermap-server-5b31bf8322c7f6bdef3880a9aff09c8d0253601b.zip
Fix Teltonika checksum
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index c80cd9cda..974d2c106 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -97,7 +97,7 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(1); // nod
response.writeShort(0);
response.writeShort(Checksum.crc16(
- Checksum.CRC16_IBM, response.nioBuffer(8, response.readableBytes() - 8)));
+ Checksum.CRC16_IBM, response.nioBuffer(8, response.readableBytes() - 10)));
channel.writeAndFlush(new NetworkMessage(response, remoteAddress));
}
}