aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/LdplProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-09 13:53:01 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-06-09 13:53:01 +1200
commit1052f99a2f4d051f08e507fc9aa3e40846421cd8 (patch)
tree878b25f8ded754c6c295351b8037708a1d036a73 /src/org/traccar/protocol/LdplProtocol.java
parentdbf2dc067c6309e8e28745462bb4a791c44a3d26 (diff)
downloadtrackermap-server-1052f99a2f4d051f08e507fc9aa3e40846421cd8.tar.gz
trackermap-server-1052f99a2f4d051f08e507fc9aa3e40846421cd8.tar.bz2
trackermap-server-1052f99a2f4d051f08e507fc9aa3e40846421cd8.zip
Fix minor issues in LDPL protocol
Diffstat (limited to 'src/org/traccar/protocol/LdplProtocol.java')
-rw-r--r--src/org/traccar/protocol/LdplProtocol.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/LdplProtocol.java b/src/org/traccar/protocol/LdplProtocol.java
index 517055f2f..01780a645 100644
--- a/src/org/traccar/protocol/LdplProtocol.java
+++ b/src/org/traccar/protocol/LdplProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,7 +18,9 @@ package org.traccar.protocol;
import java.util.List;
import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
+import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.frame.LineBasedFrameDecoder;
import org.jboss.netty.handler.codec.string.StringDecoder;
import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
@@ -32,9 +34,10 @@ public class LdplProtocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) {
+ serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectDecoder", new LdplProtocolDecoder(LdplProtocol.this));