aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-08-31 17:51:53 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-08-31 17:51:53 +1200
commitaf8aaaf1879957b83af1896dc9c1f72723bfe224 (patch)
treea9df5a4e03215c05f09133d2bf880c83f56cb4a4
parent3f8c59f633f430e477d27301f2358499906fb21a (diff)
downloadtraccar-server-af8aaaf1879957b83af1896dc9c1f72723bfe224.tar.gz
traccar-server-af8aaaf1879957b83af1896dc9c1f72723bfe224.tar.bz2
traccar-server-af8aaaf1879957b83af1896dc9c1f72723bfe224.zip
Fix H02 binary decoder
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 7bf589bef..463c0af27 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -64,8 +64,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
buf.readByte(); // marker
// Identification
- String id = String.valueOf(
- (buf.readUnsignedInt() << 8) + buf.readUnsignedByte());
+ String id = ChannelBufferTools.readHexString(buf, 10);
try {
position.setDeviceId(getDataManager().getDeviceByImei(id).getId());
} catch(Exception error) {