diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-07 02:10:44 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-07 02:10:44 +1300 |
commit | eb2165714a1ef71b4ec48a80613598b222284f0f (patch) | |
tree | 259e8b0b542c715525cf5385d1e789fa49ce4660 /src/org/traccar/protocol | |
parent | 313a51dbf23ca3ee0d5ac1d1dc37d0ff05cb2abd (diff) | |
download | trackermap-server-eb2165714a1ef71b4ec48a80613598b222284f0f.tar.gz trackermap-server-eb2165714a1ef71b4ec48a80613598b222284f0f.tar.bz2 trackermap-server-eb2165714a1ef71b4ec48a80613598b222284f0f.zip |
Handle new line in ET messages (fix #2509)
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/EasyTrackProtocol.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/EasyTrackProtocol.java b/src/org/traccar/protocol/EasyTrackProtocol.java index 78f7f0b12..eeed07129 100644 --- a/src/org/traccar/protocol/EasyTrackProtocol.java +++ b/src/org/traccar/protocol/EasyTrackProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2016 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. @@ -36,7 +36,7 @@ public class EasyTrackProtocol extends BaseProtocol { serverList.add(new TrackerServer(new ServerBootstrap(), getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '#')); + pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, "#", "\r\n")); pipeline.addLast("stringDecoder", new StringDecoder()); pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("objectDecoder", new EasyTrackProtocolDecoder(EasyTrackProtocol.this)); |