aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-01-16 00:00:52 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-01-16 00:00:52 +1300
commitf147091be957a99e55d9e7480831f81d1b202d7d (patch)
treed6fcbfdec078364f20027510e003128a892e8515 /src/org/traccar/ServerManager.java
parentb5bd3e35f563825c9d40eaa04c02bc6397029219 (diff)
downloadtrackermap-server-f147091be957a99e55d9e7480831f81d1b202d7d.tar.gz
trackermap-server-f147091be957a99e55d9e7480831f81d1b202d7d.tar.bz2
trackermap-server-f147091be957a99e55d9e7480831f81d1b202d7d.zip
Improve progress protocol
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index b1cd51040..5a9a4cc8b 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -17,6 +17,7 @@ package org.traccar;
import java.io.FileInputStream;
import java.io.IOException;
+import java.nio.ByteOrder;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.FieldPosition;
@@ -407,13 +408,15 @@ public class ServerManager {
private void initProgressServer(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) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 0, 0));
pipeline.addLast("objectDecoder", new ProgressProtocolDecoder(ServerManager.this));
}
- });
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}
@@ -508,13 +511,15 @@ public class ServerManager {
private void initNavisServer(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) {
pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(4 * 1024, 12, 2, 2, 0));
pipeline.addLast("objectDecoder", new NavisProtocolDecoder(ServerManager.this));
}
- });
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}