diff options
author | Abyss777 <abyss@fox5.ru> | 2016-10-06 13:46:20 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-10-06 13:46:20 +0500 |
commit | c0d85d814cd6ca1cbbcc14ccefef7fb7e875f190 (patch) | |
tree | 46c95928f7ad89de3d30e905a6b4a3b58390baeb /src/org | |
parent | a076c67bbdc2ed7d293f6044f4b51493b7e2d3c3 (diff) | |
download | trackermap-server-c0d85d814cd6ca1cbbcc14ccefef7fb7e875f190.tar.gz trackermap-server-c0d85d814cd6ca1cbbcc14ccefef7fb7e875f190.tar.bz2 trackermap-server-c0d85d814cd6ca1cbbcc14ccefef7fb7e875f190.zip |
Simplification and style fix
Diffstat (limited to 'src/org')
-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) { |