aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-17 12:10:37 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-17 12:10:37 +1300
commitb7429d1e8110f8a5baf58edad652ad50c4c9d38e (patch)
treec8c21282771fe6e3177d05fe270765b66b5e71db /src
parenta6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41 (diff)
downloadtrackermap-server-b7429d1e8110f8a5baf58edad652ad50c4c9d38e.tar.gz
trackermap-server-b7429d1e8110f8a5baf58edad652ad50c4c9d38e.tar.bz2
trackermap-server-b7429d1e8110f8a5baf58edad652ad50c4c9d38e.zip
Fix totem frame decoder
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/TotemFrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TotemFrameDecoder.java b/src/org/traccar/protocol/TotemFrameDecoder.java
index 4889fbe0f..5ac3064e6 100644
--- a/src/org/traccar/protocol/TotemFrameDecoder.java
+++ b/src/org/traccar/protocol/TotemFrameDecoder.java
@@ -40,7 +40,7 @@ public class TotemFrameDecoder extends FrameDecoder {
}
// Read message
- int length = Integer.parseInt(buf.toString(2, 2, Charset.defaultCharset()), 16);
+ int length = Integer.parseInt(buf.toString(buf.readerIndex() + 2, 2, Charset.defaultCharset()), 16);
if (length <= buf.readableBytes()) {
return buf.readBytes(length);
}