aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/TrackboxProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 22:33:56 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-09 22:33:56 +1300
commit30cf4d484307ad89ce538bae36c47c91eb430536 (patch)
tree78caf275ff46530c53d8d1ccb89092aea00f23b4 /src/org/traccar/protocol/TrackboxProtocolDecoder.java
parent9e569d3f839838f84f46e164660f294e9d4ca709 (diff)
downloadtrackermap-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/TrackboxProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index 30b327df6..58795d4d3 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -58,21 +58,20 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
String sentence = (String) msg;
if (sentence.startsWith("a=connect")) {
+
String id = sentence.substring(sentence.indexOf("i=") + 2);
if (identify(id, channel)) {
sendResponse(channel);
}
- }
+
+ } else {
- else {
- // Parse message
Matcher parser = PATTERN.matcher(sentence);
if (!parser.matches()) {
return null;
}
sendResponse(channel);
- // Create new position
Position position = new Position();
position.setDeviceId(getDeviceId());
position.setProtocol(getProtocolName());