fix: Fix the critical issues of btu and bt_common from AI review report

- advance connect queue on synchronous connect_cb failure
- lock bta_alarm_hash_map in all BTA timer APIs
- free controller params after stack disable; cleanup on init fail
- handle BTE_InitStack failure and signal init future
- validate HCI remote name event length before parse
- drop stale L2CAP quick-timer alarm events
This commit is contained in:
yangfeng
2026-06-25 10:43:29 +08:00
parent d022d594fe
commit 16fa00e3b2
11 changed files with 101 additions and 29 deletions
@@ -148,10 +148,10 @@ void btu_free_core(void)
** NOTE: Must be called before creating any tasks
** (RPC, BTU, HCIT, APPL, etc.)
**
** Returns void
** Returns true for success, otherwise false
**
******************************************************************************/
void BTU_StartUp(void)
bool BTU_StartUp(void)
{
#if BTU_DYNAMIC_MEMORY
btu_cb_ptr = (tBTU_CB *)osi_malloc(sizeof(tBTU_CB));
@@ -194,11 +194,12 @@ void BTU_StartUp(void)
goto error_exit;
}
return;
return true;
error_exit:;
LOG_ERROR("%s Unable to allocate resources for bt_workqueue", __func__);
BTU_ShutDown();
return false;
}
/*****************************************************************************