From 15beffad2c83f6e5014e3a9a44692769d45b211d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 8 Apr 2014 20:35:02 +1200 Subject: Ignore GT06 unknown header --- src/org/traccar/protocol/Gt06ProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 7bc0923cd..b3a69c274 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -83,7 +83,11 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { ChannelBuffer buf = (ChannelBuffer) msg; - buf.skipBytes(2); // header + // Check header + if (buf.readByte() != 0x78 || buf.readByte() != 0x78) { + return null; + } + int length = buf.readByte(); // size int dataLength = length - 5; -- cgit v1.2.3