Check correct return value

mib_get_request() returns lorawan_status_t value so comparing
return value to boolean is incorrect.
pull/6059/head
Kimmo Vaisanen 2018-02-12 09:51:12 +02:00 committed by Hasnain Virk
parent 7224fbae1c
commit 90c02f2843
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ lorawan_status_t LoRaWANStack::set_channel_data_rate(uint8_t data_rate)
loramac_mib_req_confirm_t mib_params;
mib_params.type = MIB_ADR;
if (mib_get_request(&mib_params) == true) {
if (mib_get_request(&mib_params) != LORAWAN_STATUS_OK) {
tr_error("Cannot set data rate. Please turn off ADR first.");
return LORAWAN_STATUS_PARAMETER_INVALID;
}