forked from espressif/esp-idf
Component/bt: fix can not remove boned device if it is connected
This commit is contained in:
@@ -3284,7 +3284,7 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
|
||||
}
|
||||
|
||||
bdcpy(conn.link_down.bd_addr, p_bda);
|
||||
conn.link_down.status = (UINT8) btm_get_acl_disc_reason_code();
|
||||
conn.link_down.reason = (UINT8) btm_get_acl_disc_reason_code();
|
||||
if ( bta_dm_cb.p_sec_cback ) {
|
||||
bta_dm_cb.p_sec_cback(BTA_DM_LINK_DOWN_EVT, &conn);
|
||||
if ( issue_unpair_cb ) {
|
||||
|
@@ -785,6 +785,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
BD_ADDR bd_addr; /* BD address peer device. */
|
||||
UINT8 status; /* connection open/closed */
|
||||
UINT8 reason; /* link down reason */
|
||||
BOOLEAN is_removed; /* TRUE if device is removed when link is down */
|
||||
#if BLE_INCLUDED == TRUE
|
||||
tBTA_TRANSPORT link_type;
|
||||
|
@@ -665,6 +665,7 @@ BOOLEAN BTM_ReadConnectedTransportAddress(BD_ADDR remote_bda, tBT_TRANSPORT tran
|
||||
|
||||
/* if no device can be located, return */
|
||||
if (p_dev_rec == NULL) {
|
||||
memset(remote_bda, 0, BD_ADDR_LEN);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user