mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(ble/bluedroid): Fixed BLE BLE periodic advertising parameter check
This commit is contained in:
@ -794,8 +794,14 @@ tBTM_STATUS BTM_BlePeriodicAdvCreateSync(tBTM_BLE_Periodic_Sync_Params *params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000)
|
if ((params->sync_timeout < 0x0a || params->sync_timeout > 0x4000)
|
||||||
|| (params->filter_policy > 0x01) || (params->addr_type > 0x01) ||
|
|| (params->filter_policy > 0x01)
|
||||||
(params->sid > 0xf) || (params->skip > 0x01F3)) {
|
/*If the Periodic Advertiser List is not used,
|
||||||
|
the Advertising_SID, Advertiser Address_Type, and Advertiser Address
|
||||||
|
parameters specify the periodic advertising device to listen to; otherwise they
|
||||||
|
shall be ignored.*/
|
||||||
|
|| (params->filter_policy == 0 && params->addr_type > 0x01)
|
||||||
|
|| (params->filter_policy == 0 && params->sid > 0xf)
|
||||||
|
|| (params->skip > 0x01F3)) {
|
||||||
status = BTM_ILLEGAL_VALUE;
|
status = BTM_ILLEGAL_VALUE;
|
||||||
BTM_TRACE_ERROR("%s, The sync parameters is invalid.", __func__);
|
BTM_TRACE_ERROR("%s, The sync parameters is invalid.", __func__);
|
||||||
goto end;
|
goto end;
|
||||||
|
Reference in New Issue
Block a user