aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavigilFrameDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-05 23:06:06 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-05 23:06:06 +1300
commit5a11de47a894bc27dc7c52c0befa10a5011c400b (patch)
tree55affa1a8f6dcf71c4853a4892b5b85718d13653 /src/org/traccar/protocol/NavigilFrameDecoder.java
parent652c9ee29e9802c50db6defd75c05b1c5e0d0b3a (diff)
downloadtrackermap-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.java3
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;