aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-06-27 00:03:53 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-06-27 00:03:53 +1200
commitb5f0858fb881c803be83c0fb105c6b8b993b0a78 (patch)
treed96d87cffaf9fda8cd6eb6f946576cbaa203a993
parent40d60c8526e122437a692c4e0fc231dd97ae950b (diff)
downloadtrackermap-server-b5f0858fb881c803be83c0fb105c6b8b993b0a78.tar.gz
trackermap-server-b5f0858fb881c803be83c0fb105c6b8b993b0a78.tar.bz2
trackermap-server-b5f0858fb881c803be83c0fb105c6b8b993b0a78.zip
Fix X1 GT06 photo decoding
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
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());