diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-20 10:31:32 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-20 10:31:32 +1300 |
commit | 1980d7a51f1a069cddbbe868f957c2152107547b (patch) | |
tree | 3a18bd99ece479f1ef08b009ce7183019a985b1e /src/org/traccar | |
parent | a3fd8b22ac0e9daa21cac87baf4a4807c4a58c3e (diff) | |
download | trackermap-server-1980d7a51f1a069cddbbe868f957c2152107547b.tar.gz trackermap-server-1980d7a51f1a069cddbbe868f957c2152107547b.tar.bz2 trackermap-server-1980d7a51f1a069cddbbe868f957c2152107547b.zip |
Fix ADM protocol frame decoder
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/AdmProtocol.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/AdmProtocolDecoder.java | 3 |
2 files changed, 1 insertions, 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 { |