diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-09 22:33:56 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-09 22:33:56 +1300 |
commit | 30cf4d484307ad89ce538bae36c47c91eb430536 (patch) | |
tree | 78caf275ff46530c53d8d1ccb89092aea00f23b4 /src/org/traccar/protocol/GpsGateProtocolDecoder.java | |
parent | 9e569d3f839838f84f46e164660f294e9d4ca709 (diff) | |
download | trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.gz trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.bz2 trackermap-server-30cf4d484307ad89ce538bae36c47c91eb430536.zip |
Fix some check style issues
Diffstat (limited to 'src/org/traccar/protocol/GpsGateProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/GpsGateProtocolDecoder.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java index 97344673c..cdd3f5bb6 100644 --- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java @@ -57,8 +57,9 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder { String sentence = (String) msg; - // Process login if (sentence.startsWith("$FRLIN,")) { + + // Login int beginIndex = sentence.indexOf(',', 7); if (beginIndex != -1) { beginIndex += 1; @@ -78,15 +79,13 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder { } else { send(channel, "$FRERR,AuthError,Parse error"); } - } - // Protocol version check - else if (sentence.startsWith("$FRVER,")) { + } else if (sentence.startsWith("$FRVER,")) { + + // Version check send(channel, "$FRVER,1,0,GpsGate Server 1.0"); - } - // Process data - else if (sentence.startsWith("$GPRMC,") && hasDeviceId()) { + } else if (sentence.startsWith("$GPRMC,") && hasDeviceId()) { // Parse message Matcher parser = PATTERN.matcher(sentence); |