fix(nimble): Fix compilation issues when BLE_MAX_STORE_BOND is set to 0

This commit is contained in:
Rahul Tank
2024-10-14 14:58:20 +05:30
parent fc8d244eae
commit 3c8aa5456e
2 changed files with 8 additions and 2 deletions
@@ -308,7 +308,6 @@ ble_store_config_write_our_sec(const struct ble_store_value_sec *value_sec)
}
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
static int
ble_store_config_delete_obj(void *values, int value_size, int idx,
int *num_values)
@@ -330,6 +329,7 @@ ble_store_config_delete_obj(void *values, int value_size, int idx,
return 0;
}
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
static int
ble_store_config_delete_sec(const struct ble_store_key_sec *key_sec,
struct ble_store_value_sec *value_secs,
@@ -878,6 +878,7 @@ ble_store_config_write_rpa_rec(const struct ble_store_value_rpa_rec *value_rpa_r
static int
ble_store_config_delete_rpa_rec(const struct ble_store_key_rpa_rec *key_rpa_rec)
{
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
int idx;
int rc;
@@ -900,6 +901,9 @@ ble_store_config_delete_rpa_rec(const struct ble_store_key_rpa_rec *key_rpa_rec)
}
return 0;
#else
return BLE_HS_ENOENT;
#endif
}
/*****************************************************************************
+3 -1
View File
@@ -191,7 +191,7 @@ ble_store_ram_write_our_sec(const struct ble_store_value_sec *value_sec)
}
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS) || MYNEWT_VAL(BLE_STORE_MAX_CCCDS)
static int
ble_store_ram_delete_obj(void *values, int value_size, int idx,
int *num_values)
@@ -212,7 +212,9 @@ ble_store_ram_delete_obj(void *values, int value_size, int idx,
return 0;
}
#endif
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
static int
ble_store_ram_delete_sec(const struct ble_store_key_sec *key_sec,
struct ble_store_value_sec *value_secs,