aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/SviasProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-08 14:05:41 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-08 14:05:41 +1200
commitacf93dbe1b5c03df4f8f82ffb7fb0cace767a416 (patch)
tree9751732b537a86285c49eb41b568289260e8afb9 /src/org/traccar/protocol/SviasProtocol.java
parent6c68a7531289c4166b7e8ea58fc1ffdbe4893ed4 (diff)
downloadtrackermap-server-acf93dbe1b5c03df4f8f82ffb7fb0cace767a416.tar.gz
trackermap-server-acf93dbe1b5c03df4f8f82ffb7fb0cace767a416.tar.bz2
trackermap-server-acf93dbe1b5c03df4f8f82ffb7fb0cace767a416.zip
Clean up Svias decoder
Diffstat (limited to 'src/org/traccar/protocol/SviasProtocol.java')
-rw-r--r--src/org/traccar/protocol/SviasProtocol.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SviasProtocol.java b/src/org/traccar/protocol/SviasProtocol.java
index 8a45f43cb..badf3d091 100644
--- a/src/org/traccar/protocol/SviasProtocol.java
+++ b/src/org/traccar/protocol/SviasProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton@traccar.org)
+ * Copyright 2018 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.jboss.netty.handler.codec.string.StringDecoder;
import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
+import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
import java.util.List;
@@ -45,6 +46,7 @@ public class SviasProtocol extends BaseProtocol {
serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
+ pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "]"));
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectEncoder", new SviasProtocolEncoder());