aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index bff04b36d..7365c9c57 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -156,6 +156,21 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
}
+ private static boolean hasLanguage(int type) {
+ switch (type) {
+ case MSG_LBS_EXTEND:
+ case MSG_GPS_PHONE:
+ case MSG_HEARTBEAT:
+ case MSG_GPS_LBS_STATUS_3:
+ case MSG_LBS_MULTIPLE:
+ case MSG_LBS_2:
+ case MSG_FENCE_MULTI:
+ return true;
+ default:
+ return false;
+ }
+ }
+
private void sendResponse(Channel channel, boolean extended, int type, ChannelBuffer content) {
if (channel != null) {
ChannelBuffer response = ChannelBuffers.dynamicBuffer();
@@ -612,6 +627,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
+ if (hasLanguage(type)) {
+ buf.readUnsignedShort();
+ }
+
sendResponse(channel, false, type, null);
return position;