aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/L100FrameDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/L100FrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/L100FrameDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/L100FrameDecoder.java b/src/org/traccar/protocol/L100FrameDecoder.java
index a597cbd7d..98c2f9768 100644
--- a/src/org/traccar/protocol/L100FrameDecoder.java
+++ b/src/org/traccar/protocol/L100FrameDecoder.java
@@ -41,7 +41,10 @@ public class L100FrameDecoder extends FrameDecoder {
index += 2; // checksum
if (buf.readableBytes() >= index - buf.readerIndex()) {
- return buf.readBytes(index - buf.readerIndex());
+ buf.skipBytes(2); // header
+ ChannelBuffer frame = buf.readBytes(index - buf.readerIndex() - 2);
+ buf.skipBytes(2); // footer
+ return frame;
}
return null;