aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-01-28 22:49:56 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-01-28 22:49:56 -0800
commitc66d791b1a6ba1f04714d652b93aff3ca792cde4 (patch)
tree44017975c1f8e169ae13b3f929f4c8d6346a360f /src/main
parent55138ee13f52e0896d4a074d838199c1a0d46147 (diff)
downloadtraccar-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.tar.gz
traccar-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.tar.bz2
traccar-server-c66d791b1a6ba1f04714d652b93aff3ca792cde4.zip
Fix frame decoder
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/AnytrekProtocol.java6
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));
}
});