aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/ApelProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java20
2 files changed, 7 insertions, 23 deletions
diff --git a/src/org/traccar/protocol/ApelProtocolDecoder.java b/src/org/traccar/protocol/ApelProtocolDecoder.java
index 9ffc473c7..54b112b59 100644
--- a/src/org/traccar/protocol/ApelProtocolDecoder.java
+++ b/src/org/traccar/protocol/ApelProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +17,9 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.sql.ResultSet;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
-import java.util.Properties;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -29,10 +27,8 @@ import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
-import org.traccar.helper.AdvancedConnection;
import org.traccar.helper.Crc;
import org.traccar.helper.Log;
-import org.traccar.helper.NamedParameterStatement;
import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
@@ -77,7 +73,7 @@ public class ApelProtocolDecoder extends BaseProtocolDecoder {
private static final String HEX_CHARS = "0123456789ABCDEF";
private void loadLastIndex() {
- try {
+ /*try {
Properties p = getServerManager().getProperties();
if (p.contains("database.selectLastIndex")) {
AdvancedConnection connection = new AdvancedConnection(
@@ -91,7 +87,7 @@ public class ApelProtocolDecoder extends BaseProtocolDecoder {
}
}
} catch(Exception error) {
- }
+ }*/
}
private void sendSimpleMessage(Channel channel, short type) {
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index c4a4d5e6f..85680c039 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,11 +17,9 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.sql.ResultSet;
import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
-import java.util.Properties;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -29,9 +27,7 @@ import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
-import org.traccar.helper.AdvancedConnection;
import org.traccar.helper.Log;
-import org.traccar.helper.NamedParameterStatement;
import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
@@ -63,11 +59,8 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
private static final String HEX_CHARS = "0123456789ABCDEF";
- /**
- * Hack to load last index from database
- */
private void loadLastIndex() {
- try {
+ /*try {
Properties p = getServerManager().getProperties();
if (p.contains("database.selectLastIndex")) {
AdvancedConnection connection = new AdvancedConnection(
@@ -81,7 +74,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
}
}
} catch(Exception error) {
- }
+ }*/
}
/**
@@ -100,13 +93,8 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
}
}
- /**
- * Decode message
- */
@Override
- protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
- throws Exception {
+ protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
int type = buf.readUnsignedShort();