From 1ae9629c521f517e97716fed654dddbde98e39e4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 22 Nov 2014 22:32:27 +1300 Subject: Fix GT06 response issue --- src/org/traccar/protocol/Gt06ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 0ef242b05..fae284e22 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -126,7 +126,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { try { deviceId = getDataManager().getDeviceByImei(imei).getId(); - buf.skipBytes(dataLength - 8); + buf.skipBytes(buf.readableBytes() - 6); sendResponse(channel, type, buf.readUnsignedShort()); } catch(Exception error) { Log.warning("Unknown device - " + imei); -- cgit v1.2.3