Merge branch 'bugfix/btdm_security_section_remove_bug' into 'master'
component/bt: Change the remove section error && SMP_INCLUDE marco See merge request !1133
This commit is contained in:
commit
9f24f06a65
4 changed files with 12 additions and 8 deletions
|
@ -57,8 +57,10 @@ static void btc_init_bluetooth(void)
|
|||
osi_alarm_init();
|
||||
bte_main_boot_entry(btc_init_callback);
|
||||
btc_config_init();
|
||||
#if (SMP_INCLUDED)
|
||||
//load the ble local key whitch has been store in the flash
|
||||
btc_dm_load_ble_local_keys();
|
||||
#endif /* #if (SMP_INCLUDED) */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,10 +29,6 @@
|
|||
static tBTA_BLE_ADV_DATA gl_bta_adv_data;
|
||||
static tBTA_BLE_ADV_DATA gl_bta_scan_rsp_data;
|
||||
|
||||
static void btc_gap_ble_arg_deep_free(btc_msg_t *msg);
|
||||
static void btc_gap_ble_cb_deep_free(btc_msg_t *msg);
|
||||
static void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
|
||||
static inline void btc_gap_ble_cb_to_app(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
|
||||
{
|
||||
esp_gap_ble_cb_t btc_gap_ble_cb = (esp_gap_ble_cb_t)btc_profile_cb_get(BTC_PID_GAP_BLE);
|
||||
|
@ -784,6 +780,7 @@ static void btc_ble_set_rand_addr (BD_ADDR rand_addr)
|
|||
}
|
||||
}
|
||||
|
||||
#if (SMP_INCLUDED)
|
||||
static void btc_ble_remove_bond_device(esp_bt_status_t status)
|
||||
{
|
||||
int ret;
|
||||
|
@ -846,6 +843,8 @@ static void btc_ble_get_bond_device_list(void)
|
|||
// release the buffer after used.
|
||||
GKI_freebuf((void *)bond_dev);
|
||||
}
|
||||
#endif /* #if (SMP_INCLUDED) */
|
||||
|
||||
static void btc_ble_config_local_privacy(bool privacy_enable, tBTA_SET_LOCAL_PRIVACY_CBACK *set_local_privacy_cback)
|
||||
{
|
||||
BTA_DmBleConfigLocalPrivacy(privacy_enable, set_local_privacy_cback);
|
||||
|
@ -939,7 +938,7 @@ void btc_gap_ble_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
|||
}
|
||||
}
|
||||
|
||||
static void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
||||
void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
||||
{
|
||||
switch (msg->act) {
|
||||
case ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT: {
|
||||
|
@ -963,7 +962,7 @@ static void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src)
|
|||
}
|
||||
}
|
||||
|
||||
static void btc_gap_ble_arg_deep_free(btc_msg_t *msg)
|
||||
void btc_gap_ble_arg_deep_free(btc_msg_t *msg)
|
||||
{
|
||||
LOG_DEBUG("%s \n", __func__);
|
||||
switch (msg->act) {
|
||||
|
@ -1002,7 +1001,7 @@ static void btc_gap_ble_arg_deep_free(btc_msg_t *msg)
|
|||
}
|
||||
}
|
||||
|
||||
static void btc_gap_ble_cb_deep_free(btc_msg_t *msg)
|
||||
void btc_gap_ble_cb_deep_free(btc_msg_t *msg)
|
||||
{
|
||||
LOG_DEBUG("%s", __func__);
|
||||
switch (msg->act) {
|
||||
|
|
|
@ -133,5 +133,9 @@ void btc_gap_ble_call_handler(btc_msg_t *msg);
|
|||
void btc_gap_ble_cb_handler(btc_msg_t *msg);
|
||||
|
||||
void btc_gap_ble_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
void btc_gap_ble_arg_deep_free(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_deep_free(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
|
||||
|
||||
#endif /* __BTC_GAP_BLE_H__ */
|
||||
|
|
|
@ -144,7 +144,6 @@ bool config_has_key_in_section(config_t *config, char *key, char *key_value)
|
|||
LOG_DEBUG("entry->key = %s, entry->value = %s", entry->key, entry->value);
|
||||
if (!strcmp(entry->key, key) && !strcmp(entry->value, key_value)) {
|
||||
LOG_DEBUG("%s, the irk aready in the flash.", __func__);
|
||||
section_free((void *)section);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue