diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-08 20:35:02 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-04-08 20:35:02 +1200 |
commit | 15beffad2c83f6e5014e3a9a44692769d45b211d (patch) | |
tree | 4c6585c44f5830fd7f4cb4b1b008405b19dadc41 /src | |
parent | 54bc7a8f1dae8c5f8e2652d42c63211e2d3f16ff (diff) | |
download | trackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.tar.gz trackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.tar.bz2 trackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.zip |
Ignore GT06 unknown header
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
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; |