aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/ProgressProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/ProgressProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index c57d6e5ce..dca0e649e 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -79,7 +79,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
length = buf.readUnsignedShortLE();
buf.skipBytes(length);
length = buf.readUnsignedShortLE();
- String imei = buf.readBytes(length).toString(StandardCharsets.US_ASCII);
+ String imei = buf.readSlice(length).toString(StandardCharsets.US_ASCII);
getDeviceSession(channel, remoteAddress, imei);
} else if (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG) {
@@ -146,7 +146,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
}
if (BitUtil.check(extraFlags, 2)) {
- position.set("passenger", ByteBufUtil.hexDump(buf.readBytes(buf.readUnsignedShortLE())));
+ position.set("passenger", ByteBufUtil.hexDump(buf.readSlice(buf.readUnsignedShortLE())));
}
if (type == MSG_ALARM) {