aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorEvgeny S Maksimov <admin@vragam.net>2019-01-22 20:49:58 +0300
committerEvgeny S Maksimov <admin@vragam.net>2019-01-22 20:49:58 +0300
commit8cf5581749554412d724ad36f0052dbfe37aa456 (patch)
treea46d162ab21a78d9f4c86baffd1cb852eebac696 /src/org/traccar/protocol
parent38e92f477d95c4361f9b40b14f764fea20e42011 (diff)
downloadtrackermap-server-8cf5581749554412d724ad36f0052dbfe37aa456.tar.gz
trackermap-server-8cf5581749554412d724ad36f0052dbfe37aa456.tar.bz2
trackermap-server-8cf5581749554412d724ad36f0052dbfe37aa456.zip
Use readXxx and readUnsignedXxx for skipping fields
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index 9ea843daa..4bce4e37f 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -501,13 +501,13 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
// Check buffer size and struct version
if (length <= buf.readableBytes() && buf.readUnsignedByte() == 0x0A) {
- buf.skipBytes(1); // Length of static part
+ buf.readUnsignedByte(); // Length of static part
index = buf.readUnsignedIntLE();
position.set(Position.KEY_INDEX, index);
position.set(Position.KEY_EVENT, buf.readUnsignedShortLE());
- buf.skipBytes(4); // event time
+ buf.readUnsignedInt(); // event time
int navSensorState = buf.readUnsignedByte();
position.setValid(BitUtil.check(navSensorState, 1));
@@ -533,7 +533,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
private Object processFlexSingle(
FlexPositionParser parser, String flexHeader, DeviceSession deviceSession, Channel channel, ByteBuf buf) {
- buf.skipBytes(4); // Event index
+ buf.readUnsignedInt(); // Event index
ParseResult result = parser.parsePosition(deviceSession, buf);