mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
Merge branch 'nimble/fix_nvs_peer_dev_bug_1.1.0-idf-v3.3' into 'nimble-1.1.0-idf-v3.3'
NimBLE: Fix bug in peer_dev_record and and broadcaster role build (nimble-1.1.0-idf-v3.3) See merge request espressif/esp-nimble!94
This commit is contained in:
@@ -865,7 +865,7 @@ ble_gap_master_ticks_until_exp(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
static uint32_t
|
||||
ble_gap_slave_ticks_until_exp(void)
|
||||
{
|
||||
@@ -1622,7 +1622,7 @@ ble_gap_master_timer(void)
|
||||
return BLE_HS_FOREVER;
|
||||
}
|
||||
|
||||
#if !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
static int32_t
|
||||
ble_gap_slave_timer(void)
|
||||
{
|
||||
@@ -1721,7 +1721,7 @@ ble_gap_timer(void)
|
||||
|
||||
min_ticks = min(master_ticks, update_ticks);
|
||||
|
||||
#if !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
#if NIMBLE_BLE_ADVERTISE && !MYNEWT_VAL(BLE_EXT_ADV)
|
||||
min_ticks = min(min_ticks, ble_gap_slave_timer());
|
||||
#endif
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ ble_rpa_remove_peer_dev_rec(struct ble_hs_dev_records *p_dev_rec)
|
||||
ble_store_num_peer_dev_rec--;
|
||||
if ((i != ble_store_num_peer_dev_rec) && (ble_store_num_peer_dev_rec != 0)) {
|
||||
memmove(&peer_dev_rec[i], &peer_dev_rec[i + 1],
|
||||
(ble_store_num_peer_dev_rec - i + 1) * sizeof(struct ble_hs_dev_records ));
|
||||
(ble_store_num_peer_dev_rec - i) * sizeof(struct ble_hs_dev_records ));
|
||||
}
|
||||
|
||||
BLE_HS_LOG(DEBUG, " RPA: removed device at index = %d, no. of peer records"
|
||||
|
||||
@@ -205,8 +205,10 @@ get_nvs_db_attribute(int obj_type, bool empty, void *value, int num_value)
|
||||
* non-matching entry from NVS */
|
||||
if (value) {
|
||||
if (obj_type == BLE_STORE_OBJ_TYPE_PEER_DEV_REC) {
|
||||
err = get_nvs_matching_index(&p_dev_rec, value, num_value,
|
||||
sizeof(struct ble_hs_dev_records));
|
||||
err = get_nvs_matching_index(&p_dev_rec.peer_sec,
|
||||
&((struct ble_hs_dev_records *)value)->peer_sec,
|
||||
num_value,
|
||||
sizeof(struct ble_hs_peer_sec));
|
||||
} else {
|
||||
if (obj_type != BLE_STORE_OBJ_TYPE_CCCD) {
|
||||
err = get_nvs_matching_index(&cur.sec, value, num_value,
|
||||
|
||||
Reference in New Issue
Block a user