From 94d34a85f2ee87418618779a4399c9a908900c63 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 12 Jan 2021 20:52:25 -0800 Subject: Little endian length --- src/main/java/org/traccar/protocol/DolphinProtocol.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/org/traccar/protocol/DolphinProtocol.java b/src/main/java/org/traccar/protocol/DolphinProtocol.java index b77a80a85..83c127940 100644 --- a/src/main/java/org/traccar/protocol/DolphinProtocol.java +++ b/src/main/java/org/traccar/protocol/DolphinProtocol.java @@ -20,13 +20,15 @@ import org.traccar.BaseProtocol; import org.traccar.PipelineBuilder; import org.traccar.TrackerServer; +import java.nio.ByteOrder; + public class DolphinProtocol extends BaseProtocol { public DolphinProtocol() { addServer(new TrackerServer(false, getName()) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { - pipeline.addLast(new LengthFieldBasedFrameDecoder(4096, 20, 4)); + pipeline.addLast(new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, 4096, 20, 4, 0, 0, true)); pipeline.addLast(new DolphinProtocolDecoder(DolphinProtocol.this)); } }); -- cgit v1.2.3