aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-12-02 08:56:33 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-12-02 08:56:33 -0800
commit972f237cd98dc477a1b497fed8270e3bdd6b6813 (patch)
tree699b13b88dec104ea03f03da3900ec0e7dc6b080
parent27509dcce40dd8528c5bd54954bd4e13612a14ef (diff)
downloadtrackermap-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.tar.gz
trackermap-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.tar.bz2
trackermap-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.zip
Update frame decoder
-rw-r--r--src/main/java/org/traccar/protocol/SuntechFrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java b/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java
index 7b8337468..8748ecc61 100644
--- a/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java
+++ b/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java
@@ -32,7 +32,7 @@ public class SuntechFrameDecoder extends BaseFrameDecoder {
protected Object decode(
ChannelHandlerContext ctx, Channel channel, ByteBuf buf) throws Exception {
- if (buf.getByte(buf.readerIndex()) == (byte) 0x81) {
+ if (buf.getByte(buf.readerIndex() + 1) == 0) {
int length = 1 + 2 + buf.getShort(buf.readerIndex() + 1);
if (buf.readableBytes() >= length) {