aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/ApelProtocolDecoder.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/ApelProtocolDecoder.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/ApelProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/ApelProtocolDecoder.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/ApelProtocolDecoder.java b/src/org/traccar/protocol/ApelProtocolDecoder.java
index 865a34e99..a04aa01af 100644
--- a/src/org/traccar/protocol/ApelProtocolDecoder.java
+++ b/src/org/traccar/protocol/ApelProtocolDecoder.java
@@ -15,9 +15,9 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.net.SocketAddress;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
@@ -109,23 +109,24 @@ public class ApelProtocolDecoder extends BaseProtocolDecoder {
}
if (type == MSG_TRACKER_ID_EXT) {
+
buf.readUnsignedInt(); // id
int length = buf.readUnsignedShort();
buf.skipBytes(length);
length = buf.readUnsignedShort();
identify(buf.readBytes(length).toString(Charset.defaultCharset()), channel);
- }
- else if (type == MSG_LAST_LOG_INDEX) {
+ } else if (type == MSG_LAST_LOG_INDEX) {
+
long index = buf.readUnsignedInt();
if (index > 0) {
newIndex = index;
requestArchive(channel);
}
- }
- // Position
- else if (hasDeviceId() && (type == MSG_CURRENT_GPS_DATA || type == MSG_STATE_FULL_INFO_T104 || type == MSG_LOG_RECORDS)) {
+ } else if (hasDeviceId()
+ && (type == MSG_CURRENT_GPS_DATA || type == MSG_STATE_FULL_INFO_T104 || type == MSG_LOG_RECORDS)) {
+
List<Position> positions = new LinkedList<>();
int recordCount = 1;