aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.cfg2
-rw-r--r--setup/linux/traccar.cfg2
-rw-r--r--setup/macosx/traccar.cfg2
-rw-r--r--setup/windows/traccar.cfg2
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/GatorProtocolDecoderTest.java11
6 files changed, 12 insertions, 9 deletions
diff --git a/default.cfg b/default.cfg
index fb6d6ae08..94ccdcc1b 100644
--- a/default.cfg
+++ b/default.cfg
@@ -65,7 +65,7 @@
<!-- Logging options -->
<entry key='logger.enable'>true</entry>
- <entry key='logger.level'>info</entry>
+ <entry key='logger.level'>all</entry>
<entry key='logger.file'>/home/user/Documents/traccar/target/tracker-server.log</entry>
<!-- Xexun server configuration -->
diff --git a/setup/linux/traccar.cfg b/setup/linux/traccar.cfg
index 2efa7931a..158811f23 100644
--- a/setup/linux/traccar.cfg
+++ b/setup/linux/traccar.cfg
@@ -64,7 +64,7 @@
<!-- Logging options -->
<entry key='logger.enable'>true</entry>
- <entry key='logger.level'>info</entry>
+ <entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>
<!-- Xexun server configuration -->
diff --git a/setup/macosx/traccar.cfg b/setup/macosx/traccar.cfg
index 2efa7931a..158811f23 100644
--- a/setup/macosx/traccar.cfg
+++ b/setup/macosx/traccar.cfg
@@ -64,7 +64,7 @@
<!-- Logging options -->
<entry key='logger.enable'>true</entry>
- <entry key='logger.level'>info</entry>
+ <entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>
<!-- Xexun server configuration -->
diff --git a/setup/windows/traccar.cfg b/setup/windows/traccar.cfg
index 5e5858992..c3a8676c7 100644
--- a/setup/windows/traccar.cfg
+++ b/setup/windows/traccar.cfg
@@ -64,7 +64,7 @@
<!-- Logging options -->
<entry key='logger.enable'>true</entry>
- <entry key='logger.level'>info</entry>
+ <entry key='logger.level'>all</entry>
<entry key='logger.file'>[LOG]</entry>
<!-- Xexun server configuration -->
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 0ef242b05..fae284e22 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -126,7 +126,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
try {
deviceId = getDataManager().getDeviceByImei(imei).getId();
- buf.skipBytes(dataLength - 8);
+ buf.skipBytes(buf.readableBytes() - 6);
sendResponse(channel, type, buf.readUnsignedShort());
} catch(Exception error) {
Log.warning("Unknown device - " + imei);
diff --git a/test/org/traccar/protocol/GatorProtocolDecoderTest.java b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
index 09e5a1ccb..6668d41ce 100644
--- a/test/org/traccar/protocol/GatorProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GatorProtocolDecoderTest.java
@@ -13,12 +13,15 @@ public class GatorProtocolDecoderTest {
GatorProtocolDecoder decoder = new GatorProtocolDecoder(new TestDataManager(), null, null);
- int[] buf1 = {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf1))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
+ new int[] {0x24,0x24,0x81,0x00,0x23,0x0C,0xA2,0x32,0x85,0x10,0x03,0x06,0x14,0x59,0x07,0x02,0x23,0x46,0x90,0x11,0x35,0x29,0x47,0x00,0x00,0x00,0x00,0xC0,0x40,0x01,0x01,0x2C,0x0E,0x11,0x00,0x00,0x00,0x21,0xCB,0x0D}))));
- int[] buf2 = {0x24,0x24,0x80,0x00,0x23,0xc2,0x63,0x1e,0x00,0x11,0x12,0x20,0x10,0x49,0x09,0x83,0x32,0x68,0x64,0x87,0x03,0x80,0x41,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x00,0x00,0x0b,0x4e,0x00,0x00,0x00,0x00,0x55,0x0d};
- verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf2))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
+ new int[] {0x24,0x24,0x80,0x00,0x23,0xc2,0x63,0x1e,0x00,0x11,0x12,0x20,0x10,0x49,0x09,0x83,0x32,0x68,0x64,0x87,0x03,0x80,0x41,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x00,0x00,0x0b,0x4e,0x00,0x00,0x00,0x00,0x55,0x0d}))));
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(
+ new int[] {0x24,0x24,0x80,0x00,0x26,0x00,0x09,0x63,0x2d,0x14,0x11,0x21,0x07,0x27,0x02,0x05,0x92,0x26,0x18,0x01,0x04,0x36,0x75,0x00,0x00,0x00,0x00,0xc0,0x47,0x00,0x07,0x9c,0x0c,0x34,0x00,0x0a,0xd8,0x0b,0x00,0xff,0x00,0x0a,0x0d}))));
+
}
}