aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-11-22 16:47:26 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-11-22 16:47:26 -0800
commit24f0197f32cee9f8951a9537123de6b5bbd4143f (patch)
treefb6102ccdcc078ff5935363cca252b8bbf122a8e /src/main/java/org/traccar/protocol
parent45690f44c55d5a6d0efc4d80a39f10578ff7e799 (diff)
downloadtrackermap-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.tar.gz
trackermap-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.tar.bz2
trackermap-server-24f0197f32cee9f8951a9537123de6b5bbd4143f.zip
Add missing photo response
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/GalileoProtocolDecoder.java17
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;
}