From f65d8164e673c5a1e2aa4d02aee8e269b19c4900 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 9 Nov 2013 20:29:15 +1300 Subject: Improve H2 frame decoder --- src/org/traccar/protocol/H02FrameDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/protocol/H02FrameDecoder.java b/src/org/traccar/protocol/H02FrameDecoder.java index 82e3201f7..b1793825e 100644 --- a/src/org/traccar/protocol/H02FrameDecoder.java +++ b/src/org/traccar/protocol/H02FrameDecoder.java @@ -34,7 +34,7 @@ public class H02FrameDecoder extends FrameDecoder { String marker = buf.toString(buf.readerIndex(), 1, Charset.defaultCharset()); - while ((marker.equals(" ") || marker.equals("\r") || marker.equals("\n")) && buf.readableBytes() > 0) { + while (!marker.equals("*") && !marker.equals("$") && buf.readableBytes() > 0) { buf.skipBytes(1); marker = buf.toString(buf.readerIndex(), 1, Charset.defaultCharset()); } -- cgit v1.2.3