aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-04 23:10:03 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-11-04 23:10:03 -0700
commit54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef (patch)
tree913303fb21e6a72512348dcdef3a2572560951e7
parent81836343161dfe5eb4aef1972a1e368686685fd6 (diff)
downloadtrackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.tar.gz
trackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.tar.bz2
trackermap-server-54e0ed6aa3fb39c344a2aaf68eb0b03967e912ef.zip
Fix photo decoding
-rw-r--r--src/main/java/org/traccar/protocol/DualcamProtocolDecoder.java2
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());