mirror of https://github.com/ARMmbed/mbed-os.git
fix incorrect parameter check in periodic advertising
parent
5283c4f1e6
commit
9e509f435b
|
@ -3219,9 +3219,8 @@ ble_error_t Gap::addDeviceToPeriodicAdvertiserList(
|
|||
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
if (peerAddressType != peer_address_type_t::PUBLIC ||
|
||||
peerAddressType != peer_address_type_t::RANDOM
|
||||
) {
|
||||
if ((peerAddressType != peer_address_type_t::PUBLIC) &&
|
||||
(peerAddressType != peer_address_type_t::RANDOM)) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
|
@ -3251,9 +3250,8 @@ ble_error_t Gap::removeDeviceFromPeriodicAdvertiserList(
|
|||
return BLE_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
if (peerAddressType != peer_address_type_t::PUBLIC ||
|
||||
peerAddressType != peer_address_type_t::RANDOM
|
||||
) {
|
||||
if ((peerAddressType != peer_address_type_t::PUBLIC) &&
|
||||
(peerAddressType != peer_address_type_t::RANDOM)) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue