aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/TekFrameDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:11:47 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-04-29 22:11:47 -0700
commit35b902cd59070a7185d99640851b99798a0d1eb7 (patch)
tree8eb5719c424f7c58235940d20af67e56397087da /src/main/java/org/traccar/protocol/TekFrameDecoder.java
parent707389659d7d1e08f774bf82557f0bcff4b13e37 (diff)
downloadtraccar-server-35b902cd59070a7185d99640851b99798a0d1eb7.tar.gz
traccar-server-35b902cd59070a7185d99640851b99798a0d1eb7.tar.bz2
traccar-server-35b902cd59070a7185d99640851b99798a0d1eb7.zip
Fix buffer reference issues
Diffstat (limited to 'src/main/java/org/traccar/protocol/TekFrameDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/TekFrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/TekFrameDecoder.java b/src/main/java/org/traccar/protocol/TekFrameDecoder.java
index 44d2c590e..c56e1f8f2 100644
--- a/src/main/java/org/traccar/protocol/TekFrameDecoder.java
+++ b/src/main/java/org/traccar/protocol/TekFrameDecoder.java
@@ -33,7 +33,7 @@ public class TekFrameDecoder extends BaseFrameDecoder {
int length = 17 + buf.getUnsignedByte(16) + (BitUtil.from(buf.getUnsignedByte(15), 6) << 6);
if (buf.readableBytes() >= length) {
- return buf.readBytes(length);
+ return buf.readRetainedSlice(length);
}
return null;