diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-06 09:40:28 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-06 09:40:28 +1200 |
commit | 36c62f0f2ca21ccd5040f8529f446b1b697dba69 (patch) | |
tree | 55990e2148485f46082b6b7b23c8f18f4def21b1 /src | |
parent | f24bf23ed026abe684cc893924d8a17de065b220 (diff) | |
download | trackermap-server-36c62f0f2ca21ccd5040f8529f446b1b697dba69.tar.gz trackermap-server-36c62f0f2ca21ccd5040f8529f446b1b697dba69.tar.bz2 trackermap-server-36c62f0f2ca21ccd5040f8529f446b1b697dba69.zip |
Fix EV07 login decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/MiniFinderProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java index 8bfb4fb36..05994b697 100644 --- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java +++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java @@ -133,7 +133,11 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; if (sentence.startsWith("!1,")) { - getDeviceSession(channel, remoteAddress, sentence.substring(3, sentence.length())); + int index = sentence.indexOf(',', 3); + if (index < 0) { + index = sentence.length(); + } + getDeviceSession(channel, remoteAddress, sentence.substring(3, index)); return null; } |