Diff between ed535b88c056c1284dbe327fa1acd6a14e0b753e and a2bd04f7318e9935805dba47d71c32e65aa0e4b8

Changed Files

File Additions Deletions Status
profiles/audio/avrcp.c +8 -2 modified

Full Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index ed436de..92477ae 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -4441,8 +4441,14 @@ 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)
+			continue;
+
+		target->player = g_slist_nth_data(server->players, 0);
+		if (target->player)
+			target->player->sessions = g_slist_append(
+						target->player->sessions,
+						session);
 	}
 
 	avrcp_player_event(player,