@@ -63,7 +63,7 @@ static void bta_gattc_cmpl_sendmsg(UINT16 conn_id, tGATTC_OPTYPE op,
63
63
tGATT_CL_COMPLETE * p_data );
64
64
static void bta_gattc_pop_command_to_send (tBTA_GATTC_CLCB * p_clcb );
65
65
66
- static void bta_gattc_deregister_cmpl (tBTA_GATTC_RCB * p_clreg );
66
+ void bta_gattc_deregister_cmpl (tBTA_GATTC_RCB * p_clreg );
67
67
static void bta_gattc_enc_cmpl_cback (tGATT_IF gattc_if , BD_ADDR bda );
68
68
static void bta_gattc_cong_cback (UINT16 conn_id , BOOLEAN congested );
69
69
static void bta_gattc_req_cback (UINT16 conn_id , UINT32 trans_id , tGATTS_REQ_TYPE type , tGATTS_DATA * p_data );
@@ -154,7 +154,7 @@ void bta_gattc_disable(tBTA_GATTC_CB *p_cb)
154
154
APPL_TRACE_DEBUG ("bta_gattc_disable" );
155
155
156
156
if (p_cb -> state != BTA_GATTC_STATE_ENABLED ) {
157
- APPL_TRACE_ERROR ("not enabled or disable in pogress " );
157
+ APPL_TRACE_ERROR ("not enabled or disable in progress " );
158
158
return ;
159
159
}
160
160
@@ -227,7 +227,7 @@ void bta_gattc_register(tBTA_GATTC_CB *p_cb, tBTA_GATTC_DATA *p_data)
227
227
if ((p_buf = (tBTA_GATTC_INT_START_IF * ) osi_malloc (sizeof (tBTA_GATTC_INT_START_IF ))) != NULL ) {
228
228
p_buf -> hdr .event = BTA_GATTC_INT_START_IF_EVT ;
229
229
p_buf -> client_if = p_cb -> cl_rcb [i ].client_if ;
230
- APPL_TRACE_DEBUG ("GATTC getbuf sucess .\n" );
230
+ APPL_TRACE_DEBUG ("GATTC getbuf success .\n" );
231
231
bta_sys_sendmsg (p_buf );
232
232
status = BTA_GATT_OK ;
233
233
} else {
@@ -841,6 +841,9 @@ void bta_gattc_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
841
841
(* p_cback )(BTA_GATTC_CLOSE_EVT , (tBTA_GATTC * )& cb_data );
842
842
}
843
843
844
+ // Please note that BTA_GATTC_CLOSE_EVT will run in the BTC task.
845
+ // because bta_gattc_deregister_cmpl did not execute as expected(this is a known issue),
846
+ // we will run it again in bta_gattc_clcb_dealloc_by_conn_id.
844
847
if (p_clreg -> num_clcb == 0 && p_clreg -> dereg_pending ) {
845
848
bta_gattc_deregister_cmpl (p_clreg );
846
849
}
@@ -1672,7 +1675,7 @@ void bta_gattc_fail(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
1672
1675
** Returns void
1673
1676
**
1674
1677
*******************************************************************************/
1675
- static void bta_gattc_deregister_cmpl (tBTA_GATTC_RCB * p_clreg )
1678
+ void bta_gattc_deregister_cmpl (tBTA_GATTC_RCB * p_clreg )
1676
1679
{
1677
1680
tBTA_GATTC_CB * p_cb = & bta_gattc_cb ;
1678
1681
tBTA_GATTC_IF client_if = p_clreg -> client_if ;
@@ -2118,7 +2121,7 @@ void bta_gattc_process_indicate(UINT16 conn_id, tGATTC_OPTYPE op, tGATT_CL_COMPL
2118
2121
bta_gattc_proc_other_indication (p_clcb , op , p_data , & notify );
2119
2122
}
2120
2123
} else if (op == GATTC_OPTYPE_INDICATION ) {
2121
- /* no one intersted and need ack? */
2124
+ /* no one interested and need ack? */
2122
2125
APPL_TRACE_DEBUG ("%s no one interested, ack now" , __func__ );
2123
2126
GATTC_SendHandleValueConfirm (conn_id , handle );
2124
2127
}
@@ -2235,7 +2238,7 @@ static void bta_gattc_req_cback (UINT16 conn_id, UINT32 trans_id, tGATTS_REQ_TYP
2235
2238
**
2236
2239
** Function bta_gattc_init_clcb_conn
2237
2240
**
2238
- ** Description Initaite a BTA CLCB connection
2241
+ ** Description Initiate a BTA CLCB connection
2239
2242
**
2240
2243
** Returns void
2241
2244
**
@@ -2252,7 +2255,7 @@ void bta_gattc_init_clcb_conn(UINT8 cif, BD_ADDR remote_bda)
2252
2255
return ;
2253
2256
}
2254
2257
2255
- /* initaite a new connection here */
2258
+ /* initiate a new connection here */
2256
2259
if ((p_clcb = bta_gattc_clcb_alloc (cif , remote_bda , BTA_GATT_TRANSPORT_LE )) != NULL ) {
2257
2260
gattc_data .hdr .layer_specific = p_clcb -> bta_conn_id = conn_id ;
2258
2261
0 commit comments