diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-08-26 20:47:53 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2015-09-02 14:36:44 +0300 |
commit | cde3bb8ab9336970036af9a7c8c2ea398c7ba626 (patch) | |
tree | 75ded7caf1295a06192d450caa0e6a9c63c58868 | |
parent | d6bb0111b569529ac42424afee555bd1067b7d0b (diff) | |
download | bluez-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.c | 2 |
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; |