diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-05 23:06:06 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-05 23:06:06 +1300 |
commit | 5a11de47a894bc27dc7c52c0befa10a5011c400b (patch) | |
tree | 55affa1a8f6dcf71c4853a4892b5b85718d13653 /src/org/traccar/protocol/NavigilFrameDecoder.java | |
parent | 652c9ee29e9802c50db6defd75c05b1c5e0d0b3a (diff) | |
download | trackermap-server-5a11de47a894bc27dc7c52c0befa10a5011c400b.tar.gz trackermap-server-5a11de47a894bc27dc7c52c0befa10a5011c400b.tar.bz2 trackermap-server-5a11de47a894bc27dc7c52c0befa10a5011c400b.zip |
Fix Navigil protocol decoder
Diffstat (limited to 'src/org/traccar/protocol/NavigilFrameDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/NavigilFrameDecoder.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/NavigilFrameDecoder.java b/src/org/traccar/protocol/NavigilFrameDecoder.java index f806e138f..48328b2e5 100644 --- a/src/org/traccar/protocol/NavigilFrameDecoder.java +++ b/src/org/traccar/protocol/NavigilFrameDecoder.java @@ -47,8 +47,9 @@ public class NavigilFrameDecoder extends FrameDecoder { if (buf.readableBytes() >= length) { if (hasPreamble) { buf.readUnsignedInt(); + length -= 4; } - return buf.readBytes(length - 4); + return buf.readBytes(length); } return null; |