From 3aebd92cc3781b417ded6260d1300434b1418e7e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 8 Sep 2017 04:45:40 +1200 Subject: Handle GOOME status message --- src/org/traccar/protocol/EelinkProtocolDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java index 11d111e54..2526282b1 100644 --- a/src/org/traccar/protocol/EelinkProtocolDecoder.java +++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java @@ -160,7 +160,9 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder { if (statusType == 0x01 || statusType == 0x02 || statusType == 0x03) { buf.readUnsignedInt(); // device time - decodeStatus(position, buf.readUnsignedShort()); + if (buf.readableBytes() >= 2) { + decodeStatus(position, buf.readUnsignedShort()); + } } } -- cgit v1.2.3