fix(nimble): Fix build when gatt client disabled

This commit is contained in:
Astha Verma
2026-09-15 12:36:03 +05:30
parent 9b67ab406c
commit 3c88ae2745
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -2336,7 +2336,6 @@ ble_gattc_cache_conn_update(uint16_t conn_handle, uint16_t start_handle, uint16_
peer->cache_state = CACHE_INVALID;
}
}
#endif
int ble_gattc_cache_refresh(ble_addr_t peer_addr)
{
@@ -2496,6 +2495,7 @@ int ble_gattc_cache_clean(ble_addr_t peer_addr)
return 0;
}
#endif
uint16_t
ble_gattc_cache_conn_get_svc_changed_handle(uint16_t conn_handle)
+3
View File
@@ -2125,6 +2125,7 @@ ble_gatts_start(void)
#if MYNEWT_VAL(BLE_GATT_CACHING)
#if MYNEWT_VAL(BLE_STATIC_TO_DYNAMIC)
#if MYNEWT_VAL(BLE_STORE_MAX_BONDS)
if (ble_gatts_conn_aware_states == NULL) {
ble_gatts_conn_aware_states = nimble_platform_mem_calloc(1, sizeof(struct ble_gatts_aware_state) * MYNEWT_VAL(BLE_STORE_MAX_BONDS));
if (ble_gatts_conn_aware_states == NULL) {
@@ -2132,6 +2133,7 @@ ble_gatts_start(void)
goto done;
}
}
#endif
#else
memset(ble_gatts_conn_aware_states, 0, sizeof ble_gatts_conn_aware_states);
#endif
@@ -2288,6 +2290,7 @@ ble_gatts_conn_can_alloc(void)
#endif
return ble_gatts_num_cfgable_chrs == 0 ||
ble_gatts_clt_cfg_pool.mp_num_blocks == 0 ||
ble_gatts_clt_cfg_pool.mp_num_free > 0;
}