diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-08 04:45:40 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-09-08 04:45:40 +1200 |
commit | 3aebd92cc3781b417ded6260d1300434b1418e7e (patch) | |
tree | a200a116a519f60c8667ba630fd4b11d0c8ea2d6 /src/org | |
parent | 5e481bfc1596de062093c5bc01cf168ed906aafc (diff) | |
download | trackermap-server-3aebd92cc3781b417ded6260d1300434b1418e7e.tar.gz trackermap-server-3aebd92cc3781b417ded6260d1300434b1418e7e.tar.bz2 trackermap-server-3aebd92cc3781b417ded6260d1300434b1418e7e.zip |
Handle GOOME status message
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/EelinkProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
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()); + } } } |