aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-08 04:45:40 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-09-08 04:45:40 +1200
commit3aebd92cc3781b417ded6260d1300434b1418e7e (patch)
treea200a116a519f60c8667ba630fd4b11d0c8ea2d6 /src
parent5e481bfc1596de062093c5bc01cf168ed906aafc (diff)
downloadtraccar-server-3aebd92cc3781b417ded6260d1300434b1418e7e.tar.gz
traccar-server-3aebd92cc3781b417ded6260d1300434b1418e7e.tar.bz2
traccar-server-3aebd92cc3781b417ded6260d1300434b1418e7e.zip
Handle GOOME status message
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java4
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());
+ }
}
}