aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/ProgressProtocolDecoder.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/ProgressProtocolDecoder.java
parent9e569d3f839838f84f46e164660f294e9d4ca709 (diff)
downloadtraccar-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.gz
traccar-server-30cf4d484307ad89ce538bae36c47c91eb430536.tar.bz2
traccar-server-30cf4d484307ad89ce538bae36c47c91eb430536.zip
Fix some check style issues
Diffstat (limited to 'src/org/traccar/protocol/ProgressProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index 08d2b12bc..bf7c649ce 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -70,8 +70,8 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
int type = buf.readUnsignedShort();
buf.readUnsignedShort(); // length
- // Authentication
if (type == MSG_IDENT || type == MSG_IDENT_FULL) {
+
buf.readUnsignedInt(); // id
int length = buf.readUnsignedShort();
buf.skipBytes(length);
@@ -80,10 +80,9 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
length = buf.readUnsignedShort();
String imei = buf.readBytes(length).toString(Charset.defaultCharset());
identify(imei, channel);
- }
- // Position
- else if (hasDeviceId() && (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG)) {
+ } else if (hasDeviceId() && (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG)) {
+
List<Position> positions = new LinkedList<>();
int recordCount = 1;