mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-01 14:50:03 +00:00
nimble: Fix compilation issues when CCCD is set to 0
This commit is contained in:
@@ -530,6 +530,7 @@ ble_nvs_restore_sec_keys(void)
|
||||
extern uint16_t ble_store_config_peer_bond_count;
|
||||
extern int ble_store_config_compare_bond_count(const void *a, const void *b);
|
||||
|
||||
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
|
||||
err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_OUR_SEC, ble_store_config_our_secs,
|
||||
&ble_store_config_num_our_secs);
|
||||
if (err != ESP_OK) {
|
||||
@@ -567,7 +568,9 @@ ble_nvs_restore_sec_keys(void)
|
||||
|
||||
ESP_LOGD(TAG, "ble_store_config_peer_secs restored %d bonds",
|
||||
ble_store_config_num_peer_secs);
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_STORE_MAX_CCCDS)
|
||||
err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_CCCD, ble_store_config_cccds,
|
||||
&ble_store_config_num_cccds);
|
||||
if (err != ESP_OK) {
|
||||
@@ -576,6 +579,7 @@ ble_nvs_restore_sec_keys(void)
|
||||
}
|
||||
ESP_LOGD(TAG, "ble_store_config_cccds restored %d bonds",
|
||||
ble_store_config_num_cccds);
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(ENC_ADV_DATA)
|
||||
err = populate_db_from_nvs(BLE_STORE_OBJ_TYPE_EAD, ble_store_config_eads,
|
||||
@@ -630,6 +634,7 @@ ble_nvs_restore_peer_records(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(BLE_STORE_MAX_CCCDS)
|
||||
int ble_store_config_persist_cccds(void)
|
||||
{
|
||||
int nvs_count, nvs_idx;
|
||||
@@ -660,6 +665,7 @@ int ble_store_config_persist_cccds(void)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MYNEWT_VAL(ENC_ADV_DATA)
|
||||
int ble_store_config_persist_eads(void)
|
||||
|
||||
Reference in New Issue
Block a user