aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-08-03 04:28:13 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-08-03 04:28:13 +1200
commita4ad1371690e6d0840e717ec8e65a88fc3b60033 (patch)
tree378b02db40f4a8a14a1f5dbcf80dd4fecac6ea56 /src
parente8357f9fbde73e5d10f512ded4a5ded935a6efc0 (diff)
downloadtrackermap-server-a4ad1371690e6d0840e717ec8e65a88fc3b60033.tar.gz
trackermap-server-a4ad1371690e6d0840e717ec8e65a88fc3b60033.tar.bz2
trackermap-server-a4ad1371690e6d0840e717ec8e65a88fc3b60033.zip
Handle alternative GT06 message format
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index dfb0b5e07..e405bc195 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -251,8 +251,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
position.setNetwork(new Network(CellTower.from(
BitUtil.to(mcc, 15), mnc, buf.readUnsignedShort(), buf.readUnsignedMedium())));
- if (length > 0) {
- buf.skipBytes(length - (hasLength ? 9 : 8));
+ if (length > 9) {
+ buf.skipBytes(length - 9);
}
return true;