Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7bceb34 authored by Jeremy Wu's avatar Jeremy Wu
Browse files

Floss: initialize HFP debug dump when triggered

When certain conditions are met, the debug dump is in a dirty state that
can contain arbitrary values and cause the process to crash.

This CL initializes the struct so things work as intended.

Bug: 269970706
Test: atest bluetooth_test_gd
Test: btclient > media log
Change-Id: I74f1a72a2fc6d7b7aa1ac540ce9f962866c5176b
parent 4f3c7a98
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1708,7 +1708,7 @@ static uint16_t btm_sco_voice_settings_to_legacy(enh_esco_params_t* p_params) {
 ******************************************************************************/
tBTM_SCO_DEBUG_DUMP BTM_GetScoDebugDump() {
  tSCO_CONN* active_sco = btm_get_active_sco();
  tBTM_SCO_DEBUG_DUMP debug_dump;
  tBTM_SCO_DEBUG_DUMP debug_dump = {};

  debug_dump.is_active = active_sco != nullptr;
  if (!debug_dump.is_active) return debug_dump;