1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

net/asymcute : Move 'ASYMCUTE_KEEPALIVE' to 'CONFIG_'

This commit is contained in:
Akshai M 2020-06-26 17:57:56 +05:30
parent 7ba0d3c76f
commit 1753b84cba
2 changed files with 5 additions and 5 deletions

View File

@ -115,13 +115,13 @@ extern "C" {
#define CONFIG_ASYMCUTE_TOPIC_MAXLEN (32U)
#endif
#ifndef ASYMCUTE_KEEPALIVE
#ifndef CONFIG_ASYMCUTE_KEEPALIVE
/**
* @brief Keep alive interval [in s] communicated to the gateway
*
* For the default value, see spec v1.2, section 7.2 -> T_WAIT: > 5 min
*/
#define ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/
#define CONFIG_ASYMCUTE_KEEPALIVE (360) /* -> 6 min*/
#endif
#ifndef ASYMCUTE_KEEPALIVE_PING
@ -131,9 +131,9 @@ extern "C" {
* The default behavior of this implementation is to send ping messages as soon
* as three quarters of the keep alive interval have passed.
*
* @note Must be less than ASYMCUTE_KEEPALIVE
* @note Must be less than CONFIG_ASYMCUTE_KEEPALIVE
*/
#define ASYMCUTE_KEEPALIVE_PING ((ASYMCUTE_KEEPALIVE / 4) * 3)
#define ASYMCUTE_KEEPALIVE_PING ((CONFIG_ASYMCUTE_KEEPALIVE / 4) * 3)
#endif
#ifndef ASYMCUTE_T_RETRY

View File

@ -752,7 +752,7 @@ int asymcute_connect(asymcute_con_t *con, asymcute_req_t *req,
req->data[1] = MQTTSN_CONNECT;
req->data[2] = ((clean) ? MQTTSN_CS : 0);
req->data[3] = PROTOCOL_VERSION;
byteorder_htobebufs(&req->data[4], ASYMCUTE_KEEPALIVE);
byteorder_htobebufs(&req->data[4], CONFIG_ASYMCUTE_KEEPALIVE);
memcpy(&req->data[6], cli_id, id_len);
req->data_len = (size_t)req->data[0];
_req_send(req, con, _on_con_timeout);