aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-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