diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-28 16:08:40 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-04-28 16:08:40 +1200 |
commit | c763c6c688a2148e46c951c9fc33c09e640bcd9d (patch) | |
tree | b259117ab656c5c473ef3b0d4d6bf4598b226723 /src/org/traccar/protocol/L100FrameDecoder.java | |
parent | 7e121784cc9fc79d058f2bdc5bd631a027e7c455 (diff) | |
download | traccar-server-c763c6c688a2148e46c951c9fc33c09e640bcd9d.tar.gz traccar-server-c763c6c688a2148e46c951c9fc33c09e640bcd9d.tar.bz2 traccar-server-c763c6c688a2148e46c951c9fc33c09e640bcd9d.zip |
Refactor L100 protocol for Atlanta devices
Diffstat (limited to 'src/org/traccar/protocol/L100FrameDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/L100FrameDecoder.java | 5 |
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; |