aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:38:49 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-03 11:38:49 +1300
commita4112a82274cca88cec14429ddf36e0af4ee7400 (patch)
tree3e9325cbdf737c3529e86cd53c57f1813eb4f5d5 /src
parent24b6fb1778d4d5c8835974fca92c00558323e0e2 (diff)
downloadtrackermap-server-a4112a82274cca88cec14429ddf36e0af4ee7400.tar.gz
trackermap-server-a4112a82274cca88cec14429ddf36e0af4ee7400.tar.bz2
trackermap-server-a4112a82274cca88cec14429ddf36e0af4ee7400.zip
Fix Sanav frame decoder
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/ServerManager.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 7e087f263..771ea6480 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -1024,7 +1024,9 @@ public class ServerManager {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
+ byte delimiter[] = { (byte) '*' };
+ pipeline.addLast("frameDecoder",
+ new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectDecoder", new SanavProtocolDecoder(ServerManager.this));
}