aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NvsProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-01-12 09:50:01 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-01-12 09:50:01 +1300
commit887eaceee6f1a15da75b1b3d5f8b97284fffe6e8 (patch)
treede7de0ea7a5b3a8bdad1739f924fa4ec4d38769f /src/org/traccar/protocol/NvsProtocolDecoder.java
parent7dea8d701b8c5dfe777aed39474151eee0887551 (diff)
downloadtrackermap-server-887eaceee6f1a15da75b1b3d5f8b97284fffe6e8.tar.gz
trackermap-server-887eaceee6f1a15da75b1b3d5f8b97284fffe6e8.tar.bz2
trackermap-server-887eaceee6f1a15da75b1b3d5f8b97284fffe6e8.zip
Fix Navis device identifier decoding
Diffstat (limited to 'src/org/traccar/protocol/NvsProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/NvsProtocolDecoder.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/NvsProtocolDecoder.java b/src/org/traccar/protocol/NvsProtocolDecoder.java
index 0c15f6fc5..9dcf31899 100644
--- a/src/org/traccar/protocol/NvsProtocolDecoder.java
+++ b/src/org/traccar/protocol/NvsProtocolDecoder.java
@@ -50,6 +50,8 @@ public class NvsProtocolDecoder extends BaseProtocolDecoder {
if (buf.getUnsignedByte(buf.readerIndex()) == 0) {
+ buf.readUnsignedShort(); // length
+
String imei = buf.toString(buf.readerIndex(), 15, Charset.defaultCharset());
if (!identify(imei, channel, remoteAddress)) {