Message ID | 20201010222719.439956-1-daniel@simko.xyz |
---|---|
State | New |
Headers | show |
Series | [BlueZ] profiles: Fix segfault when using headset controls | expand |
This is automated email and please do not reply to this email! Dear submitter, Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series: PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=362639 ---Test result--- ############################## Test: CheckPatch - PASS ############################## Test: CheckGitLint - PASS ############################## Test: CheckBuild - PASS ############################## Test: MakeCheck - PASS --- Regards, Linux Bluetooth
Hi Daniel, On Sun, Oct 11, 2020 at 12:32 PM <bluez.test.bot@gmail.com> wrote: > > This is automated email and please do not reply to this email! > > Dear submitter, > > Thank you for submitting the patches to the linux bluetooth mailing list. > This is a CI test results with your patch series: > PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=362639 > > ---Test result--- > > ############################## > Test: CheckPatch - PASS > > ############################## > Test: CheckGitLint - PASS > > ############################## > Test: CheckBuild - PASS > > ############################## > Test: MakeCheck - PASS > > > > --- > Regards, > Linux Bluetooth Applied, thanks. Note that I did some small cosmetic changes and also add a call to notify_addressed_player_changed since we are changing the addressed player in the process. -- Luiz Augusto von Dentz
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index ed436de3b..70f52efe8 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -4441,8 +4441,19 @@ void avrcp_unregister_player(struct avrcp_player *player) if (target == NULL) continue; - if (target->player == player) - target->player = g_slist_nth_data(server->players, 0); + if (target->player == player) { + struct avrcp_player *next_player = g_slist_nth_data( + server->players, + 0); + + target->player = next_player; + + if (next_player) { + next_player->sessions = g_slist_append( + next_player->sessions, + session); + } + } } avrcp_player_event(player,