Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion nimble/host/src/ble_gatts.c
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ int
ble_gatts_conn_can_alloc(void)
{
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;
}

Expand Down Expand Up @@ -2868,7 +2869,7 @@ int ble_gatts_add_dynamic_svcs(const struct ble_gatt_svc_def *svcs) {
ble_gatts_free_svc_defs();
/* Fill the cache. */
cfg = ble_gatts_get_last_cfg(&ble_gatts_clt_cfgs);
ha = ble_att_svr_find_by_handle(cfg->chr_val_handle - 1);
ha = cfg == NULL ? NULL : ble_att_svr_find_by_handle(cfg->chr_val_handle - 1);
while ((ha = ble_att_svr_find_by_uuid(ha, &uuid.u, 0xffff)) != NULL) {
chr = ha->ha_cb_arg;
allowed_flags = ble_gatts_chr_clt_cfg_allowed(chr);
Expand Down