diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/EasyTrackProtocol.java | 2 | ||||
-rw-r--r-- | src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/EasyTrackProtocol.java b/src/main/java/org/traccar/protocol/EasyTrackProtocol.java index 4626156a5..972b36077 100644 --- a/src/main/java/org/traccar/protocol/EasyTrackProtocol.java +++ b/src/main/java/org/traccar/protocol/EasyTrackProtocol.java @@ -34,7 +34,7 @@ public class EasyTrackProtocol extends BaseProtocol { addServer(new TrackerServer(false, getName()) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { - pipeline.addLast(new CharacterDelimiterFrameDecoder(1024, "#", "\r\n")); + pipeline.addLast(new CharacterDelimiterFrameDecoder(1024, "#\r\n", "#", "\r\n")); pipeline.addLast(new StringDecoder()); pipeline.addLast(new StringEncoder()); pipeline.addLast(new EasyTrackProtocolEncoder(EasyTrackProtocol.this)); diff --git a/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java index c86e14db2..060483f5d 100644 --- a/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java +++ b/src/test/java/org/traccar/protocol/EasyTrackProtocolDecoderTest.java @@ -11,6 +11,9 @@ public class EasyTrackProtocolDecoderTest extends ProtocolTest { EasyTrackProtocolDecoder decoder = new EasyTrackProtocolDecoder(null); verifyNull(decoder, text( + "*ET,358155100132943,MQ")); + + verifyNull(decoder, text( "*ET,354522180045564,TX,V,14070E,122336")); verifyPosition(decoder, text( |