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

Commit ac914e52 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

leaudio: On remove node clean group info

Bug: 150670922
Test: atest --host bluetooth_le_audio_test
bluetooth_le_audio_client_test
Sponsor: @jpawlowski

Change-Id: I8108b84d1007d74b2b539fd6b137803f1e4b19cb
parent 6b76940b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -60,7 +60,13 @@ void LeAudioDeviceGroup::AddNode(

void LeAudioDeviceGroup::RemoveNode(
    const std::shared_ptr<LeAudioDevice>& leAudioDevice) {
  /* Group information cleaning in the device. */
  leAudioDevice->group_id_ = bluetooth::groups::kGroupUnknown;
  for (auto ase : leAudioDevice->ases_) {
    ase.active = false;
    ase.cis_conn_hdl = 0;
  }

  leAudioDevices_.erase(
      std::remove_if(
          leAudioDevices_.begin(), leAudioDevices_.end(),