mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/btdm_add_check_peer_addr_type_in_set_adv_params' into 'master'
Component/bt: add check peer addr type in set adv params See merge request idf/esp-idf!3732
This commit is contained in:
commit
69c9e050b0
@ -291,7 +291,7 @@ typedef struct {
|
|||||||
esp_ble_adv_type_t adv_type; /*!< Advertising type */
|
esp_ble_adv_type_t adv_type; /*!< Advertising type */
|
||||||
esp_ble_addr_type_t own_addr_type; /*!< Owner bluetooth device address type */
|
esp_ble_addr_type_t own_addr_type; /*!< Owner bluetooth device address type */
|
||||||
esp_bd_addr_t peer_addr; /*!< Peer device bluetooth device address */
|
esp_bd_addr_t peer_addr; /*!< Peer device bluetooth device address */
|
||||||
esp_ble_addr_type_t peer_addr_type; /*!< Peer device bluetooth device address type */
|
esp_ble_addr_type_t peer_addr_type; /*!< Peer device bluetooth device address type, only support public address type and random address type */
|
||||||
esp_ble_adv_channel_t channel_map; /*!< Advertising channel map */
|
esp_ble_adv_channel_t channel_map; /*!< Advertising channel map */
|
||||||
esp_ble_adv_filter_t adv_filter_policy; /*!< Advertising filter policy */
|
esp_ble_adv_filter_t adv_filter_policy; /*!< Advertising filter policy */
|
||||||
} esp_ble_adv_params_t;
|
} esp_ble_adv_params_t;
|
||||||
|
@ -452,6 +452,10 @@ static void btc_ble_start_advertising (esp_ble_adv_params_t *ble_adv_params, tBT
|
|||||||
status = ESP_BT_STATUS_PARM_INVALID;
|
status = ESP_BT_STATUS_PARM_INVALID;
|
||||||
BTC_TRACE_ERROR("Invalid advertisting channel map parameters.\n");
|
BTC_TRACE_ERROR("Invalid advertisting channel map parameters.\n");
|
||||||
}
|
}
|
||||||
|
if (!BLE_ISVALID_PARAM(ble_adv_params->peer_addr_type, BLE_ADDR_TYPE_PUBLIC, BLE_ADDR_TYPE_RANDOM)) {
|
||||||
|
status = ESP_BT_STATUS_PARM_INVALID;
|
||||||
|
BTC_TRACE_ERROR("Invalid advertisting peer address type parameters.\n");
|
||||||
|
}
|
||||||
if(status != ESP_BT_STATUS_SUCCESS) {
|
if(status != ESP_BT_STATUS_SUCCESS) {
|
||||||
if(start_adv_cback) {
|
if(start_adv_cback) {
|
||||||
start_adv_cback(status);
|
start_adv_cback(status);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user