diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-28 22:49:56 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-01-28 22:49:56 -0800 |
commit | c66d791b1a6ba1f04714d652b93aff3ca792cde4 (patch) | |
tree | 44017975c1f8e169ae13b3f929f4c8d6346a360f /src/main/java/org/traccar | |
parent | 55138ee13f52e0896d4a074d838199c1a0d46147 (diff) | |
download | trackermap-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.tar.gz trackermap-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.tar.bz2 trackermap-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.zip |
Fix frame decoder
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/AnytrekProtocol.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/AnytrekProtocol.java b/src/main/java/org/traccar/protocol/AnytrekProtocol.java index 4ab5833f7..9bd0c9163 100644 --- a/src/main/java/org/traccar/protocol/AnytrekProtocol.java +++ b/src/main/java/org/traccar/protocol/AnytrekProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 Anton Tananaev (anton@traccar.org) + * Copyright 2018 - 2021 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,13 +20,15 @@ import org.traccar.BaseProtocol; import org.traccar.PipelineBuilder; import org.traccar.TrackerServer; +import java.nio.ByteOrder; + public class AnytrekProtocol extends BaseProtocol { public AnytrekProtocol() { addServer(new TrackerServer(false, getName()) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { - pipeline.addLast(new LengthFieldBasedFrameDecoder(1024, 2, 2, 2, 0)); + pipeline.addLast(new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, 1024, 2, 2, 2, 0, true)); pipeline.addLast(new AnytrekProtocolDecoder(AnytrekProtocol.this)); } }); |