diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-01 02:52:53 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-10-01 02:52:53 +1300 |
commit | 342d98583ac923239f769aaf70bbc9e7979c139f (patch) | |
tree | 43aa039549fbbbcfa098cd9e1d15fd72e4db43fe | |
parent | ce00123fd32fdb9fab126ee7ba2e7f16d616ea3d (diff) | |
download | traccar-server-342d98583ac923239f769aaf70bbc9e7979c139f.tar.gz traccar-server-342d98583ac923239f769aaf70bbc9e7979c139f.tar.bz2 traccar-server-342d98583ac923239f769aaf70bbc9e7979c139f.zip |
Change megastek frame decoder (fix #895)
-rw-r--r-- | src/org/traccar/ServerManager.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 448b7685e..7c085d0be 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -597,9 +597,7 @@ public class ServerManager { serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - byte delimiter[] = { (byte) '\r', (byte) '\n' }; - pipeline.addLast("frameDecoder", - new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter))); + pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024)); pipeline.addLast("stringDecoder", new StringDecoder()); pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("objectDecoder", new MegastekProtocolDecoder(ServerManager.this)); |