kopia lustrzana https://github.com/espressif/esp-idf
components/bt: Fix crash in BTM_SetPowerMode after disconnect
Introduced by commit 0583a049
pull/5682/merge
rodzic
ecd75ec652
commit
dac798afbb
|
@ -194,6 +194,10 @@ tBTM_STATUS BTM_SetPowerMode (UINT8 pm_id, BD_ADDR remote_bda, tBTM_PM_PWR_MD *p
|
|||
mode = p_mode->mode & ~BTM_PM_MD_FORCE;
|
||||
|
||||
p_acl_cb = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
|
||||
if (p_acl_cb == NULL){
|
||||
return BTM_UNKNOWN_ADDR;
|
||||
}
|
||||
|
||||
p_cb = p_acl_cb->p_pm_mode_db;
|
||||
if (mode != BTM_PM_MD_ACTIVE) {
|
||||
/* check if the requested mode is supported */
|
||||
|
|
Ładowanie…
Reference in New Issue