From 6b0798a32d7a56272285cd57fe56199683df70b5 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Tue, 9 Feb 2016 16:20:41 -0800 Subject: [PATCH] Fix auto disconnect right after connecting Change-Id: Ia36cd898c21058b9a3ed56a0d300c3ea8384a5cf --- stack/gatt/gatt_api.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c index e142cb0ae..88351dd4d 100644 --- a/stack/gatt/gatt_api.c +++ b/stack/gatt/gatt_api.c @@ -1285,11 +1285,6 @@ void GATT_Deregister (tGATT_IF gatt_if) 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++) @@ -1506,10 +1501,6 @@ tGATT_STATUS GATT_Disconnect (UINT16 conn_id) 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; -- 2.11.0