aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnshul Jain <anshuljain1985@gmail.com>2017-08-28 14:10:13 +0530
committerAnshul Jain <anshuljain1985@gmail.com>2017-08-28 14:10:13 +0530
commit538ef8e3f04dd4108b16dc39f3df3e535c7dea7f (patch)
treef873fc3d49f759a19fe297520f73d11deb2ec6ff /src/org/traccar/protocol/Gt06ProtocolDecoder.java
parentb90dfecfdc127d1870f5f61db177f8d63fb9a095 (diff)
downloadtrackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.tar.gz
trackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.tar.bz2
trackermap-server-538ef8e3f04dd4108b16dc39f3df3e535c7dea7f.zip
Added new column to determine for extended or basic decode.
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index dbbaeaf03..cf2b8c928 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -191,7 +191,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
return true;
}
- private boolean decodeLbs(Position position, ChannelBuffer buf, boolean hasLength) {
+ private boolean decodeLbs(Position position, ChannelBuffer buf, boolean hasLength, boolean isExtended) {
int length = 0;
if (hasLength) {
@@ -205,7 +205,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
buf.readUnsignedShort(), buf.readUnsignedByte(), buf.readUnsignedShort(), buf.readUnsignedMedium())));
if (length > 0) {
- if (hasLength) {
+ if (hasLength && !isExtended) {
buf.skipBytes(length - 9);
} else {
buf.skipBytes(length - 8);
@@ -468,7 +468,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
if (hasLbs(type)) {
- decodeLbs(position, buf, hasStatus(type));
+ decodeLbs(position, buf, hasStatus(type), false);
}
if (hasStatus(type)) {
@@ -580,7 +580,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, position.getDeviceTime());
}
- decodeLbs(position, buf, true);
+ decodeLbs(position, buf, true, true);
buf.skipBytes(buf.readUnsignedByte()); // additional cell towers
buf.skipBytes(buf.readUnsignedByte()); // wifi access point