aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/At2000Protocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-12-09 01:58:36 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-12-09 01:58:36 +1300
commit627069db35c2ef3a433847a546aa7a2c0e0f4d3b (patch)
treea0b997b6b46f85a4463a2b972ec8742115610cf2 /src/org/traccar/protocol/At2000Protocol.java
parent50503c7108e580e5bc00d6c67055de273f476911 (diff)
downloadtrackermap-server-627069db35c2ef3a433847a546aa7a2c0e0f4d3b.tar.gz
trackermap-server-627069db35c2ef3a433847a546aa7a2c0e0f4d3b.tar.bz2
trackermap-server-627069db35c2ef3a433847a546aa7a2c0e0f4d3b.zip
Fix endianness for AT2000 (fix #2662)
Diffstat (limited to 'src/org/traccar/protocol/At2000Protocol.java')
-rw-r--r--src/org/traccar/protocol/At2000Protocol.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/At2000Protocol.java b/src/org/traccar/protocol/At2000Protocol.java
index 418619cb4..35aa0b469 100644
--- a/src/org/traccar/protocol/At2000Protocol.java
+++ b/src/org/traccar/protocol/At2000Protocol.java
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import java.nio.ByteOrder;
import java.util.List;
public class At2000Protocol extends BaseProtocol {
@@ -30,13 +31,15 @@ public class At2000Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new At2000FrameDecoder());
pipeline.addLast("objectDecoder", new At2000ProtocolDecoder(At2000Protocol.this));
}
- });
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}