diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-11-22 16:47:26 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-11-22 16:47:26 -0800 |
commit | 24f0197f32cee9f8951a9537123de6b5bbd4143f (patch) | |
tree | fb6102ccdcc078ff5935363cca252b8bbf122a8e /src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java | |
parent | 45690f44c55d5a6d0efc4d80a39f10578ff7e799 (diff) | |
download | traccar-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.tar.gz traccar-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.tar.bz2 traccar-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.zip |
Add missing photo response
Diffstat (limited to 'src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java b/src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java index dc558147a..f29fb9850 100644 --- a/src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java @@ -309,18 +309,17 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { Position position = null; - if (length > 1) { + if (photo == null) { + photo = Unpooled.buffer(); + } - if (photo == null) { - photo = Unpooled.buffer(); - } + buf.readUnsignedByte(); // part number - buf.readUnsignedByte(); // part number - photo.writeBytes(buf, length - 1); + if (length > 1) { - sendResponse(channel, 0x07, buf.readUnsignedShortLE()); + photo.writeBytes(buf, length - 1); - } else if (photo != null) { + } else { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); String uniqueId = Context.getIdentityManager().getById(deviceSession.getDeviceId()).getUniqueId(); @@ -336,6 +335,8 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder { } + sendResponse(channel, 0x07, buf.readUnsignedShortLE()); + return position; } |