Merge pull request #7895 from kivaisan/remove_duplicate_linkcheckreq

Lora: Remove duplicate LinkCheckReq MAC command
pull/7940/merge
Anna Bridge 2018-09-03 16:43:02 +01:00 committed by GitHub
commit 4fb3aec84a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -306,7 +306,7 @@ int16_t LoRaWANStack::handle_tx(const uint8_t port, const uint8_t *data,
// add a link check request with normal data, until the application
// explicitly removes it.
if (_link_check_requested) {
set_link_check_request();
_loramac.setup_link_check_request();
}
if (!_lw_session.active) {
@ -442,13 +442,12 @@ lorawan_status_t LoRaWANStack::set_link_check_request()
return LORAWAN_STATUS_NOT_INITIALIZED;
}
_link_check_requested = true;
if (!_callbacks.link_check_resp) {
tr_error("Must assign a callback function for link check request. ");
return LORAWAN_STATUS_PARAMETER_INVALID;
}
_loramac.setup_link_check_request();
_link_check_requested = true;
return LORAWAN_STATUS_OK;
}