if (gatt_get_ch_state(p_tcb) != GATT_CH_CLOSE)
{
gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE);
- if (!gatt_num_apps_hold_link(p_tcb))
- {
- /* this will disconnect the link or cancel the pending connect request at lower layer*/
- gatt_disconnect(p_tcb);
- }
}
for (j = 0, p_clcb= &gatt_cb.clcb[j]; j < GATT_CL_MAX_LCB; j++, p_clcb++)
if (p_tcb)
{
gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE);
- if (!gatt_num_apps_hold_link(p_tcb))
- {
- gatt_disconnect(p_tcb);
- }
ret = GATT_SUCCESS;
}
return ret;