aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-05-17 21:05:31 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-05-17 21:05:31 +1200
commit4d01f322be1c49f7a057bda6e9ce7e492b9b7311 (patch)
tree4b7e90cd233d1c814d50aae2020b669f218fc855 /src/org/traccar/ServerManager.java
parent85067159044c06bded8e64c8d832591c5e567ff2 (diff)
downloadtrackermap-server-4d01f322be1c49f7a057bda6e9ce7e492b9b7311.tar.gz
trackermap-server-4d01f322be1c49f7a057bda6e9ce7e492b9b7311.tar.bz2
trackermap-server-4d01f322be1c49f7a057bda6e9ce7e492b9b7311.zip
Implement T322 protocol (fix #499)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 1a3cf0a00..6d65dad18 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -519,17 +519,15 @@ public class ServerManager {
private void initMeitrackServer(String protocol) throws SQLException {
if (isProtocolEnabled(properties, protocol)) {
- serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) {
+ TrackerServer server = new TrackerServer(this, new ServerBootstrap(), protocol) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
- byte delimiter[] = { (byte) '\r', (byte) '\n' };
- pipeline.addLast("frameDecoder",
- new DelimiterBasedFrameDecoder(1024, ChannelBuffers.wrappedBuffer(delimiter)));
- pipeline.addLast("stringDecoder", new StringDecoder());
- pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("frameDecoder", new MeitrackFrameDecoder());
pipeline.addLast("objectDecoder", new MeitrackProtocolDecoder(ServerManager.this));
}
- });
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}