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

Commit c3c71bca authored by Grzegorz Kołodziejczyk's avatar Grzegorz Kołodziejczyk Committed by Grzegorz Kolodziejczyk
Browse files

le_audio: Dump first active group

This changes order of dumping LE Audio groups. Active group will be
dumped first.

Tag: #feature
Test: atest bluetooth_le_audio_test bluetooth_le_audio_client_test
Bug: 263372634
Change-Id: Ibb8ec219e6cc5c31095c36c3686a9df4b14c3242
parent 9a791fbc
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -2762,8 +2762,19 @@ void LeAudioDeviceGroups::Cleanup(void) {
}

void LeAudioDeviceGroups::Dump(int fd, int active_group_id) {
  /* Dump first active group */
  for (auto& g : groups_) {
    if (g->group_id_ == active_group_id) {
      g->Dump(fd, active_group_id);
      break;
    }
  }

  /* Dump non active group */
  for (auto& g : groups_) {
    if (g->group_id_ != active_group_id) {
      g->Dump(fd, active_group_id);
    }
  }
}