aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-20 11:44:05 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-20 11:44:05 +1300
commit919dadbd4d808ea32f53b139c3d22f902f3d1e21 (patch)
tree80cf6b6d179f5f5141fb1e705c53964e52d5c440 /src/org/traccar
parentcb82a22fc74e225fd74e3b88b2080a31a777e425 (diff)
downloadtraccar-server-919dadbd4d808ea32f53b139c3d22f902f3d1e21.tar.gz
traccar-server-919dadbd4d808ea32f53b139c3d22f902f3d1e21.tar.bz2
traccar-server-919dadbd4d808ea32f53b139c3d22f902f3d1e21.zip
Change GNX frame decoder delimiter
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/GnxProtocol.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/GnxProtocol.java b/src/org/traccar/protocol/GnxProtocol.java
index 34d9554b1..7cbc14916 100644
--- a/src/org/traccar/protocol/GnxProtocol.java
+++ b/src/org/traccar/protocol/GnxProtocol.java
@@ -17,9 +17,9 @@ package org.traccar.protocol;
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.traccar.BaseProtocol;
+import org.traccar.CharacterDelimiterFrameDecoder;
import org.traccar.TrackerServer;
import java.util.List;
@@ -35,7 +35,7 @@ public class GnxProtocol extends BaseProtocol {
serverList.add(new TrackerServer(new ServerBootstrap(), this.getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- pipeline.addLast("frameDecoder", new LineBasedFrameDecoder(1024));
+ pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "\n\r"));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("objectDecoder", new GnxProtocolDecoder(GnxProtocol.this));
}