diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-11-04 23:10:03 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-11-04 23:10:03 -0700 |
commit | 54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef (patch) | |
tree | 913303fb21e6a72512348dcdef3a2572560951e7 /src/main | |
parent | 81836343161dfe5eb4aef1972a1e368686685fd6 (diff) | |
download | trackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.tar.gz trackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.tar.bz2 trackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.zip |
Fix photo decoding
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java b/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java index 390b8e705..457b5ae62 100644 --- a/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java @@ -93,7 +93,7 @@ public class DualcamProtocolDecoder extends BaseProtocolDecoder { break; case MSG_DATA: buf.readUnsignedShort(); // length - photo.writeBytes(buf, buf.readableBytes()); + photo.writeBytes(buf, buf.readableBytes() - 2); if (currentPacket == packetCount) { deviceSession = getDeviceSession(channel, remoteAddress); Position position = new Position(getProtocolName()); |