From 1980d7a51f1a069cddbbe868f957c2152107547b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 20 Oct 2015 10:31:32 +1300 Subject: Fix ADM protocol frame decoder --- src/org/traccar/protocol/AdmProtocol.java | 2 +- src/org/traccar/protocol/AdmProtocolDecoder.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/org/traccar/protocol/AdmProtocol.java b/src/org/traccar/protocol/AdmProtocol.java index c07acb033..40dd340cf 100644 --- a/src/org/traccar/protocol/AdmProtocol.java +++ b/src/org/traccar/protocol/AdmProtocol.java @@ -35,7 +35,7 @@ public class AdmProtocol extends BaseProtocol { TrackerServer server = new TrackerServer(new ServerBootstrap(), this.getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 1, -4, 0)); + pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 1, -3, 0)); pipeline.addLast("objectDecoder", new AdmProtocolDecoder(AdmProtocol.this)); } }; diff --git a/src/org/traccar/protocol/AdmProtocolDecoder.java b/src/org/traccar/protocol/AdmProtocolDecoder.java index 300f38346..a22cade99 100644 --- a/src/org/traccar/protocol/AdmProtocolDecoder.java +++ b/src/org/traccar/protocol/AdmProtocolDecoder.java @@ -16,7 +16,6 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffer; -import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.helper.BitUtil; @@ -26,9 +25,7 @@ import org.traccar.model.Position; import java.net.SocketAddress; import java.nio.charset.Charset; -import java.util.Calendar; import java.util.Date; -import java.util.TimeZone; public class AdmProtocolDecoder extends BaseProtocolDecoder { -- cgit v1.2.3