diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/ServerManager.java | 2 | ||||
-rw-r--r-- | src/org/traccar/protocol/ProgressProtocolDecoder.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index 5a9a4cc8b..23b067712 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -411,7 +411,7 @@ public class ServerManager { 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("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, 4, 0)); pipeline.addLast("objectDecoder", new ProgressProtocolDecoder(ServerManager.this)); } }; diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java index 525aff49e..d3f582225 100644 --- a/src/org/traccar/protocol/ProgressProtocolDecoder.java +++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java @@ -65,7 +65,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder { /** * Hack to load last index from database */ - /*private void loadLastIndex() { + private void loadLastIndex() { try { Properties p = getServerManager().getProperties(); AdvancedConnection connection = new AdvancedConnection( @@ -79,7 +79,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder { } } catch(Exception error) { } - }*/ + } /** * Request archive messages @@ -127,7 +127,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder { } // Position - else if (/*deviceId != 0 &&*/ (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG)) { + else if (deviceId != 0 && (type == MSG_POINT || type == MSG_ALARM || type == MSG_LOGMSG)) { List<Position> positions = new LinkedList<Position>(); int recordCount = 1; |