aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-07-26 22:00:24 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2013-07-26 22:00:24 +1200
commita6452523a4d3b975e13851c6ab46b4939a43d27f (patch)
tree07b674000c5cbae3e3af5ac058214027746b87eb /src/org/traccar/ServerManager.java
parent1d937b1dd08d496d7bb94c074892ac0b01fcff6f (diff)
downloadtrackermap-server-a6452523a4d3b975e13851c6ab46b4939a43d27f.tar.gz
trackermap-server-a6452523a4d3b975e13851c6ab46b4939a43d27f.tar.bz2
trackermap-server-a6452523a4d3b975e13851c6ab46b4939a43d27f.zip
Complete PT3000 protocol (fix #285)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-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 465ef3d8e..61bf55616 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -910,7 +910,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) 'd' }; // probably wrong
+ pipeline.addLast("frameDecoder",
+ new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectDecoder", new Pt3000ProtocolDecoder(ServerManager.this));