diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-03 22:02:24 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-02-03 22:02:24 -0800 |
commit | 117189248da9cac8426d8fa4fb50f8a8d63f56b0 (patch) | |
tree | 02bd75d3312693808422125209b08cf53c297fc5 /src/main/java/org/traccar/protocol | |
parent | 574566c160357f2e2cac45368ec363ab59952a6d (diff) | |
download | traccar-server-117189248da9cac8426d8fa4fb50f8a8d63f56b0.tar.gz traccar-server-117189248da9cac8426d8fa4fb50f8a8d63f56b0.tar.bz2 traccar-server-117189248da9cac8426d8fa4fb50f8a8d63f56b0.zip |
Fix Arnavi response
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java b/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java index 0924cfc40..d25c02414 100644 --- a/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/ArnaviBinaryProtocolDecoder.java @@ -63,7 +63,8 @@ public class ArnaviBinaryProtocolDecoder extends BaseProtocolDecoder { response.writeByte(0x04); response.writeByte(0x00); ByteBuffer time = ByteBuffer.allocate(4).putInt((int) (System.currentTimeMillis() / 1000)); - response.writeByte(Checksum.modulo256(time)); + time.position(0); + response.writeByte(Checksum.modulo256(time.slice())); response.writeBytes(time); } response.writeByte(0x7d); |