Merge branch 'bugfix/btdm_fix_cant_remove_boned_device_if_its_connected' into 'master'

Component/bt: fix can not remove boned device if it is connected

See merge request !1758
This commit is contained in:
Jiang Jiang Jian 2018-01-09 11:42:45 +08:00
commit ff726b4c79
3 changed files with 3 additions and 1 deletions

View File

@ -3278,7 +3278,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 ) {

View File

@ -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;

View File

@ -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;
}