From 5b53ab9f5d2144f4d6c0a456f1781e89ec598fe2 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Thu, 14 Apr 2016 03:06:54 -0700 Subject: [PATCH] Fix LE central device not being able to disconnect This fixes issue introduced in https://android-review.googlesource.com/#/c/202278 Bug: 28211048 Change-Id: I08e62149358f1c1fc1759a4ca9eb375cb0ad8230 --- stack/gatt/gatt_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack/gatt/gatt_api.c b/stack/gatt/gatt_api.c index c9518936b..deddf66ec 100644 --- a/stack/gatt/gatt_api.c +++ b/stack/gatt/gatt_api.c @@ -1274,7 +1274,7 @@ 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); + gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, TRUE); } for (j = 0, p_clcb= &gatt_cb.clcb[j]; j < GATT_CL_MAX_LCB; j++, p_clcb++) @@ -1490,7 +1490,7 @@ tGATT_STATUS GATT_Disconnect (UINT16 conn_id) if (p_tcb) { - gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, FALSE); + gatt_update_app_use_link_flag(gatt_if, p_tcb, FALSE, TRUE); ret = GATT_SUCCESS; } return ret; -- 2.11.0