diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-08 14:05:41 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-08 14:05:41 +1200 |
commit | acf93dbe1b5c03df4f8f82ffb7fb0cace767a416 (patch) | |
tree | 9751732b537a86285c49eb41b568289260e8afb9 /src/org/traccar/protocol/SviasProtocol.java | |
parent | 6c68a7531289c4166b7e8ea58fc1ffdbe4893ed4 (diff) | |
download | trackermap-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.java | 4 |
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());
|