From: Nitin Arora Date: Thu, 14 May 2015 01:39:50 +0000 (-0700) Subject: Update GATT channel state to closing during disconnection X-Git-Tag: android-x86-8.1-r1~196^2~67^2~174^2~136 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ce1f3407a45490a15ce447508abf5ff7757fb51c;p=android-x86%2Fsystem-bt.git Update GATT channel state to closing during disconnection This change ensures that the GATT channel state is moved to CLOSING state while GATT disconnect is requested by the host, specifically when the GATT state is OPEN. This is needed to prevent any furthur GATT operations, once GATT disconnect is issued. Change-Id: I8511caa477881de4f4eaf18b84f23530e1958fe9 --- diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c index f12fd252d..d935710cb 100644 --- a/stack/gatt/gatt_main.c +++ b/stack/gatt/gatt_main.c @@ -244,9 +244,9 @@ bool gatt_disconnect (tGATT_TCB *p_tcb) } else { - gatt_set_ch_state(p_tcb, GATT_CH_CLOSING); ret = L2CA_CancelBleConnectReq (p_tcb->peer_bda); } + gatt_set_ch_state(p_tcb, GATT_CH_CLOSING); } else {