aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
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 /src/main/java
parent27509dcce40dd8528c5bd54954bd4e13612a14ef (diff)
downloadtraccar-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.tar.gz
traccar-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.tar.bz2
traccar-server-972f237cd98dc477a1b497fed8270e3bdd6b6813.zip
Update frame decoder
Diffstat (limited to 'src/main/java')
-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) {