diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-12 02:07:56 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-12 01:07:56 +1300 |
commit | e54122e22725bae7a962d58e06a497526aed46cb (patch) | |
tree | 2a69b6f039103564252ebf42df618353898e681f /src/org/traccar/protocol/H02ProtocolDecoder.java | |
parent | afa6bfcef49c7152b3292010f43075356b9c9727 (diff) | |
download | trackermap-server-e54122e22725bae7a962d58e06a497526aed46cb.tar.gz trackermap-server-e54122e22725bae7a962d58e06a497526aed46cb.tar.bz2 trackermap-server-e54122e22725bae7a962d58e06a497526aed46cb.zip |
Better handle H02 X mode (fix #2780)
Diffstat (limited to 'src/org/traccar/protocol/H02ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/H02ProtocolDecoder.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java index 431dd5c3c..c2a3b2b09 100644 --- a/src/org/traccar/protocol/H02ProtocolDecoder.java +++ b/src/org/traccar/protocol/H02ProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2016 Anton Tananaev (anton@traccar.org) + * Copyright 2012 - 2017 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -305,8 +305,6 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { ChannelBuffer buf = (ChannelBuffer) msg; String marker = buf.toString(0, 1, StandardCharsets.US_ASCII); - // handle X mode? - if (marker.equals("*")) { String sentence = buf.toString(StandardCharsets.US_ASCII); if (sentence.contains(",NBR,")) { @@ -316,6 +314,8 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { } } else if (marker.equals("$")) { return decodeBinary(buf, channel, remoteAddress); + } else if (marker.equals("X")) { + return null; // X mode } return null; |