From b5f0858fb881c803be83c0fb105c6b8b993b0a78 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 27 Jun 2017 00:03:53 +1200 Subject: Fix X1 GT06 photo decoding --- src/org/traccar/protocol/Gt06ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 4d8161af9..0821de722 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -507,7 +507,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedInt(); // offset buf.readBytes(photo, buf.readUnsignedShort()); - if (buf.writableBytes() > 0) { + if (photo.writableBytes() > 0) { sendPhotoRequest(channel, pictureId); } else { Device device = Context.getDeviceManager().getDeviceById(deviceSession.getDeviceId()); -- cgit v1.2.3