aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-06 07:04:31 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-06 07:04:31 -0700
commitab9ff21bec23723132ed8183979be22b67c1cb3c (patch)
tree1a0e9f808030663e6b54f10ced70eaf1df92da10 /src/main/java/org/traccar/protocol
parent75f1bed91c1669e1442c2ab9ea9af0b5754db4db (diff)
downloadtrackermap-server-ab9ff21bec23723132ed8183979be22b67c1cb3c.tar.gz
trackermap-server-ab9ff21bec23723132ed8183979be22b67c1cb3c.tar.bz2
trackermap-server-ab9ff21bec23723132ed8183979be22b67c1cb3c.zip
Fix Huabao responses
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 0eded4b42..27555d46d 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -165,8 +165,8 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
if (serial.matches("[0-9]+")) {
return serial;
} else {
- long imei = id.readUnsignedShort();
- imei = (imei << 32) + id.readUnsignedInt();
+ long imei = id.getUnsignedShort(0);
+ imei = (imei << 32) + id.getUnsignedInt(2);
return String.valueOf(imei);
}
}