* [PATCH 1/1] audio/avrcp: Assign player id during player registration
@ 2015-01-21 10:54 Sagar Nageshmurthy
2015-01-22 9:12 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 2+ messages in thread
From: Sagar Nageshmurthy @ 2015-01-21 10:54 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Sagar Nageshmurthy
---
profiles/audio/avrcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 11de6ee..d258c28 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -3662,6 +3662,7 @@ 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)
@@ -3672,6 +3673,7 @@ struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
player->cb = cb;
player->user_data = user_data;
player->destroy = destroy;
+ player->id = ++id;
server->players = g_slist_append(server->players, player);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] audio/avrcp: Assign player id during player registration
2015-01-21 10:54 [PATCH 1/1] audio/avrcp: Assign player id during player registration Sagar Nageshmurthy
@ 2015-01-22 9:12 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2015-01-22 9:12 UTC (permalink / raw)
To: Sagar Nageshmurthy; +Cc: linux-bluetooth
Hi Sagar,
On Wed, Jan 21, 2015 at 12:54 PM, Sagar Nageshmurthy
<s.nageshmurt@samsung.com> wrote:
> ---
> profiles/audio/avrcp.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 11de6ee..d258c28 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -3662,6 +3662,7 @@ 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)
> @@ -3672,6 +3673,7 @@ struct avrcp_player *avrcp_register_player(struct btd_adapter *adapter,
> player->cb = cb;
> player->user_data = user_data;
> player->destroy = destroy;
> + player->id = ++id;
>
> server->players = g_slist_append(server->players, player);
>
> --
> 1.7.9.5
Id reuse the id if possible, but we are not really using the id for
anything in the TG so I wonder what is you plan regarding it?
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-22 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-21 10:54 [PATCH 1/1] audio/avrcp: Assign player id during player registration Sagar Nageshmurthy
2015-01-22 9:12 ` Luiz Augusto von Dentz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.