Skip to content

Commit

Permalink
fix(bt): Fixes #12616
Browse files Browse the repository at this point in the history
* Ensures SM_SC_LOC_OOB_DATA_UP_EVT is processed regardless of device pointer - fixing OOB data creation issue on ESP32/PICO
  • Loading branch information
finger563 committed Nov 17, 2023
1 parent c824346 commit 118df6d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions components/bt/host/bluedroid/stack/btm/btm_ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -2280,15 +2280,15 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data)

}
} else {
if (event == SMP_SC_LOC_OOB_DATA_UP_EVT) {
tBTM_LE_EVT_DATA evt_data;
memcpy(&evt_data.local_oob_data, &p_data->loc_oob_data, sizeof(tSMP_LOC_OOB_DATA));
if (btm_cb.api.p_le_callback) {
(*btm_cb.api.p_le_callback)(event, bd_addr, &evt_data);
}
} else {
BTM_TRACE_ERROR("btm_proc_smp_cback received for unknown device");
}
if (event == SMP_SC_LOC_OOB_DATA_UP_EVT) {
tBTM_LE_EVT_DATA evt_data;
memcpy(&evt_data.local_oob_data, &p_data->loc_oob_data, sizeof(tSMP_LOC_OOB_DATA));
if (btm_cb.api.p_le_callback) {
(*btm_cb.api.p_le_callback)(event, bd_addr, &evt_data);
}
} else {
BTM_TRACE_ERROR("btm_proc_smp_cback received for unknown device");
}
return 0;
}
Expand Down

0 comments on commit 118df6d

Please sign in to comment.