aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-01-29 20:43:38 -0800
committerAnton Tananaev <anton@traccar.org>2024-01-29 20:43:38 -0800
commitb7d405e9d5cc64b88dfd09cd43d621338f550d68 (patch)
tree06f7af2ac6ed45d0a90da2e476d9e4d3881804e5 /src/main
parent7726ea879700329b62700528ad495f4f1c515dd0 (diff)
downloadtrackermap-server-b7d405e9d5cc64b88dfd09cd43d621338f550d68.tar.gz
trackermap-server-b7d405e9d5cc64b88dfd09cd43d621338f550d68.tar.bz2
trackermap-server-b7d405e9d5cc64b88dfd09cd43d621338f550d68.zip
Minor FleetGuide updates
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java b/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java
index d63187921..4e5de2b3e 100644
--- a/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java
@@ -43,12 +43,12 @@ public class FleetGuideProtocolDecoder extends BaseProtocolDecoder {
ByteBuf buf = (ByteBuf) msg;
buf.readUnsignedByte(); // signature
- int options = buf.readUnsignedShort();
+ int options = buf.readUnsignedShortLE();
int length = BitUtil.to(options, 11);
DeviceSession deviceSession;
if (BitUtil.check(options, 11)) {
- deviceSession = getDeviceSession(channel, remoteAddress, String.valueOf(buf.readUnsignedInt()));
+ deviceSession = getDeviceSession(channel, remoteAddress, String.valueOf(buf.readUnsignedIntLE()));
} else {
deviceSession = getDeviceSession(channel, remoteAddress);
}
@@ -64,7 +64,7 @@ public class FleetGuideProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(options, 13)) {
- buf.readUnsignedShort(); // acknowledgement
+ buf.readUnsignedShortLE(); // acknowledgement
}
ByteBuf data;
@@ -84,6 +84,7 @@ public class FleetGuideProtocolDecoder extends BaseProtocolDecoder {
Class<?> clazz = Class.forName("io.netty.handler.codec.compression.FastLz");
Method method = clazz.getDeclaredMethod(
"decompress", ByteBuf.class, int.class, int.class, ByteBuf.class, int.class, int.class);
+ method.setAccessible(true);
ByteBuf output = Unpooled.buffer();
int result = (Integer) method.invoke(