aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-10-27 13:27:10 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-10-27 13:27:10 +1300
commita6730a508ed9672fcad825f30977b6157e33bb23 (patch)
tree39a49aaa9ea6889f62d5c3c9c05bab1c50be88a8 /src
parent7ab4d181e1fa783de132309dc2a4edbe67d1b912 (diff)
downloadtraccar-server-a6730a508ed9672fcad825f30977b6157e33bb23.tar.gz
traccar-server-a6730a508ed9672fcad825f30977b6157e33bb23.tar.bz2
traccar-server-a6730a508ed9672fcad825f30977b6157e33bb23.zip
Add new delimiter for gl200
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/ServerManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 897642551..28a645e51 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -276,9 +276,12 @@ public class ServerManager {
serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- byte delimiter[] = { (byte) '$' };
+ byte delimiter1[] = { (byte) '$' };
+ byte delimiter2[] = { (byte) '\0' };
pipeline.addLast("frameDecoder",
- new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
+ new DelimiterBasedFrameDecoder(1024,
+ ChannelBuffers.wrappedBuffer(delimiter1),
+ ChannelBuffers.wrappedBuffer(delimiter2)));
pipeline.addLast("stringDecoder", new StringDecoder());
pipeline.addLast("stringEncoder", new StringEncoder());
pipeline.addLast("objectDecoder", new Gl200ProtocolDecoder(ServerManager.this));