aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-13 23:37:14 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-09-13 23:37:14 +1200
commit497627bc9fc7ab9330295ba463b50f4085b6be9b (patch)
tree65da509fd3d79173e55bb0185a9c33be7a28418b /src
parent0aeeac33163640bbbe23560cbd108ddf290ac873 (diff)
downloadtraccar-server-497627bc9fc7ab9330295ba463b50f4085b6be9b.tar.gz
traccar-server-497627bc9fc7ab9330295ba463b50f4085b6be9b.tar.bz2
traccar-server-497627bc9fc7ab9330295ba463b50f4085b6be9b.zip
Put back H02 frame decoder hack
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/H02FrameDecoder.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/H02FrameDecoder.java b/src/org/traccar/protocol/H02FrameDecoder.java
index 572ac979e..feba8033d 100644
--- a/src/org/traccar/protocol/H02FrameDecoder.java
+++ b/src/org/traccar/protocol/H02FrameDecoder.java
@@ -34,6 +34,13 @@ public class H02FrameDecoder extends FrameDecoder {
char marker = (char) buf.getByte(buf.readerIndex());
+ while (marker != '*' && marker != '$' && buf.readableBytes() > 0) {
+ buf.skipBytes(1);
+ if (buf.readableBytes() > 0) {
+ marker = (char) buf.getByte(buf.readerIndex());
+ }
+ }
+
if (marker == '*') {
// Return text message