Skip to content

Commit 4fb3aec

Browse files
authored
Merge pull request #7895 from kivaisan/remove_duplicate_linkcheckreq
Lora: Remove duplicate LinkCheckReq MAC command
2 parents 2efa4e4 + 6dc83dd commit 4fb3aec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

features/lorawan/LoRaWANStack.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ int16_t LoRaWANStack::handle_tx(const uint8_t port, const uint8_t *data,
306306
// add a link check request with normal data, until the application
307307
// explicitly removes it.
308308
if (_link_check_requested) {
309-
set_link_check_request();
309+
_loramac.setup_link_check_request();
310310
}
311311

312312
if (!_lw_session.active) {
@@ -442,13 +442,12 @@ lorawan_status_t LoRaWANStack::set_link_check_request()
442442
return LORAWAN_STATUS_NOT_INITIALIZED;
443443
}
444444

445-
_link_check_requested = true;
446445
if (!_callbacks.link_check_resp) {
447446
tr_error("Must assign a callback function for link check request. ");
448447
return LORAWAN_STATUS_PARAMETER_INVALID;
449448
}
450449

451-
_loramac.setup_link_check_request();
450+
_link_check_requested = true;
452451
return LORAWAN_STATUS_OK;
453452
}
454453

0 commit comments

Comments
 (0)