aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TlvProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/TlvProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TlvProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TlvProtocolDecoder.java b/src/org/traccar/protocol/TlvProtocolDecoder.java
index ae1a3346a..b682345db 100644
--- a/src/org/traccar/protocol/TlvProtocolDecoder.java
+++ b/src/org/traccar/protocol/TlvProtocolDecoder.java
@@ -48,7 +48,7 @@ public class TlvProtocolDecoder extends BaseProtocolDecoder {
}
private String readArgument(ByteBuf buf) {
- return buf.readBytes(buf.readUnsignedByte()).toString(StandardCharsets.US_ASCII);
+ return buf.readSlice(buf.readUnsignedByte()).toString(StandardCharsets.US_ASCII);
}
@Override
@@ -57,7 +57,7 @@ public class TlvProtocolDecoder extends BaseProtocolDecoder {
ByteBuf buf = (ByteBuf) msg;
- String type = buf.readBytes(2).toString(StandardCharsets.US_ASCII);
+ String type = buf.readSlice(2).toString(StandardCharsets.US_ASCII);
if (channel != null) {
switch (type) {