summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-08-26 20:47:53 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2015-09-02 14:36:44 +0300
commitcde3bb8ab9336970036af9a7c8c2ea398c7ba626 (patch)
tree75ded7caf1295a06192d450caa0e6a9c63c58868
parentd6bb0111b569529ac42424afee555bd1067b7d0b (diff)
downloadbluez-cde3bb8ab9336970036af9a7c8c2ea398c7ba626.tar.gz
audio/avrcp: Assing ids when registering a player
This gives the local player an id so when respoding to GetFolderItem they are distinguishable.
-rw-r--r--profiles/audio/avrcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 29fd67ab6..750bdd909 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -4058,12 +4058,14 @@ struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
struct avrcp_server *server;
struct avrcp_player *player;
GSList *l;
+ static uint16_t id = 0;
server = find_server(servers, adapter);
if (!server)
return NULL;
player = g_new0(struct avrcp_player, 1);
+ player->id = ++id;
player->server = server;
player->cb = cb;
player->user_data = user_data;