Skip to content

Commit

Permalink
Merge branch 'fix/build_error_in_compiler_performance_mode_v4.4' into…
Browse files Browse the repository at this point in the history
… 'release/v4.4'

fix(bt/bluedroid): fixed build error when compiler in performace mode (backport v4.4)

See merge request espressif/esp-idf!27866
  • Loading branch information
jack0c committed Dec 13, 2023
2 parents a2b4ddc + ba81334 commit e47fe5d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
5 changes: 4 additions & 1 deletion components/bt/host/bluedroid/bta/hf_ag/bta_ag_sdp.c
Expand Up @@ -243,13 +243,16 @@ void bta_ag_del_records(tBTA_AG_SCB *p_scb, tBTA_AG_DATA *p_data)
UNUSED(p_data);

/* get services of all other registered servers */
for (i = 0; i < BTA_AG_NUM_IDX; i++, p++) {
for (i = 0; i < BTA_AG_NUM_IDX; i++) {
if (p_scb == p) {
continue;
}
if (p->in_use && p->dealloc == FALSE) {
others |= p->reg_services;
}
if (i < BTA_AG_NUM_SCB) {
p++;
}
}
others >>= BTA_HSP_SERVICE_ID;
services = p_scb->reg_services >> BTA_HSP_SERVICE_ID;
Expand Down
14 changes: 12 additions & 2 deletions components/bt/host/bluedroid/bta/jv/bta_jv_act.c
Expand Up @@ -1199,10 +1199,15 @@ void bta_jv_delete_record(tBTA_JV_MSG *p_data)
*******************************************************************************/
static void bta_jv_l2cap_client_cback(UINT16 gap_handle, UINT16 event)
{
if (gap_handle >= BTA_JV_MAX_L2C_CONN) {
APPL_TRACE_WARNING("Invalid gap_handle: %u", gap_handle);
return;
}

tBTA_JV_L2C_CB *p_cb = &bta_jv_cb.l2c_cb[gap_handle];
tBTA_JV evt_data = {0};

if (gap_handle >= BTA_JV_MAX_L2C_CONN && !p_cb->p_cback) {
if (!p_cb->p_cback) {
return;
}

Expand Down Expand Up @@ -1354,12 +1359,17 @@ void bta_jv_l2cap_close(tBTA_JV_MSG *p_data)
*******************************************************************************/
static void bta_jv_l2cap_server_cback(UINT16 gap_handle, UINT16 event)
{
if (gap_handle >= BTA_JV_MAX_L2C_CONN) {
APPL_TRACE_WARNING("Invalid gap_handle: %u", gap_handle);
return;
}

tBTA_JV_L2C_CB *p_cb = &bta_jv_cb.l2c_cb[gap_handle];
tBTA_JV evt_data = {0};
tBTA_JV_L2CAP_CBACK *p_cback;
void *user_data;

if (gap_handle >= BTA_JV_MAX_L2C_CONN && !p_cb->p_cback) {
if (!p_cb->p_cback) {
return;
}

Expand Down

0 comments on commit e47fe5d

Please sign in to comment.