aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-07 16:43:00 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-07-07 16:43:00 +1200
commit11bc6b9a9384c7fe417615af0cd7d42bbf4d78ff (patch)
tree363dcf7851019b17800b86fc2fbd3661832bec65 /src/org/traccar/protocol/Gt06ProtocolDecoder.java
parent173abe94195da45f2521e75a8ac4a37e074fdc6b (diff)
downloadtrackermap-server-11bc6b9a9384c7fe417615af0cd7d42bbf4d78ff.tar.gz
trackermap-server-11bc6b9a9384c7fe417615af0cd7d42bbf4d78ff.tar.bz2
trackermap-server-11bc6b9a9384c7fe417615af0cd7d42bbf4d78ff.zip
Add Gator heartbeat response
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 00444b61b..12c9d20b5 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -87,9 +87,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
private static void sendResponse(Channel channel, int type, int index) {
if (channel != null) {
- ChannelBuffer response = ChannelBuffers.directBuffer(10);
+ ChannelBuffer response = ChannelBuffers.dynamicBuffer();
response.writeByte(0x78); response.writeByte(0x78); // header
- response.writeByte(0x05); // size
+ response.writeByte(5); // size
response.writeByte(type);
response.writeShort(index);
response.writeShort(Checksum.crc16(Checksum.CRC16_X25, response.toByteBuffer(2, 4)));