aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-04-08 20:35:02 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-04-08 20:35:02 +1200
commit15beffad2c83f6e5014e3a9a44692769d45b211d (patch)
tree4c6585c44f5830fd7f4cb4b1b008405b19dadc41 /src/org
parent54bc7a8f1dae8c5f8e2652d42c63211e2d3f16ff (diff)
downloadtrackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.tar.gz
trackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.tar.bz2
trackermap-server-15beffad2c83f6e5014e3a9a44692769d45b211d.zip
Ignore GT06 unknown header
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java6
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;