aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-03-06 16:23:24 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-03-06 16:23:24 -0800
commit7f28cbe9a997fb5271ece16f30383d7cc4241575 (patch)
tree0ca3a8a8b386dd745af86423e81dd068a89ede46 /src/main
parentb6eed4bde62316d66c28d3cb029df6e537be17a5 (diff)
downloadtraccar-server-7f28cbe9a997fb5271ece16f30383d7cc4241575.tar.gz
traccar-server-7f28cbe9a997fb5271ece16f30383d7cc4241575.tar.bz2
traccar-server-7f28cbe9a997fb5271ece16f30383d7cc4241575.zip
Send heartbeat response
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index a3d16cb62..e715547ed 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2020 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,6 +45,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_GENERAL_RESPONSE = 0x8001;
public static final int MSG_GENERAL_RESPONSE_2 = 0x4401;
+ public static final int MSG_HEARTBEAT = 0x0002;
public static final int MSG_TERMINAL_REGISTER = 0x0100;
public static final int MSG_TERMINAL_REGISTER_RESPONSE = 0x8100;
public static final int MSG_TERMINAL_CONTROL = 0x8105;
@@ -171,7 +172,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
formatMessage(MSG_TERMINAL_REGISTER_RESPONSE, id, false, response), remoteAddress));
}
- } else if (type == MSG_TERMINAL_AUTH) {
+ } else if (type == MSG_TERMINAL_AUTH || type == MSG_HEARTBEAT) {
sendGeneralResponse(channel, remoteAddress, id, type, index);