diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gl200ProtocolDecoder.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java index e2ddccaa7..2d28ea199 100644 --- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java @@ -38,7 +38,8 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { } private static final Pattern PATTERN_ACK = new PatternBuilder() - .text("+ACK:GT").expression("...,") + .text("+ACK:GT") + .expression("...,") // type .number("([0-9A-Z]{2}xxxx),") // protocol version .number("(d{15}),") // imei .any().text(",") @@ -639,7 +640,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder { Object result; String type = sentence.substring(typeIndex + 3, typeIndex + 6); - if (typeIndex >= 4 && sentence.startsWith("+ACK", typeIndex - 4)) { + if (sentence.startsWith("+ACK")) { result = decodeAck(channel, remoteAddress, sentence, type); } else { switch (type) { |