From: Jakub Pawlowski Date: Wed, 10 Feb 2016 00:20:41 +0000 (-0800) Subject: Fix auto disconnect right after connecting X-Git-Tag: android-x86-8.1-r1~1736^2~128 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6b0798a32d;p=android-x86%2Fsystem-bt.git Fix auto disconnect right after connecting Change-Id: Ia36cd898c21058b9a3ed56a0d300c3ea8384a5cf --- 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;