Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 6/9] AVRCP: Register to AVCTP state changes without depending on player
Date: Fri,  5 Oct 2012 23:20:47 +0200	[thread overview]
Message-ID: <1349472050-25928-6-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1349472050-25928-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

It is not longer necessary to have a player to be able to register the
extra pdu handlers.
---
 audio/avrcp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/audio/avrcp.c b/audio/avrcp.c
index aa62987..295a1e1 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -1467,6 +1467,9 @@ int avrcp_register(const bdaddr_t *src, GKeyFile *config)
 
 	servers = g_slist_append(servers, server);
 
+	if (!avctp_id)
+		avctp_id = avctp_add_state_cb(state_changed, NULL);
+
 	return 0;
 }
 
@@ -1528,9 +1531,6 @@ struct avrcp_player *avrcp_register_player(const bdaddr_t *src,
 	player->user_data = user_data;
 	player->destroy = destroy;
 
-	if (!avctp_id)
-		avctp_id = avctp_add_state_cb(state_changed, NULL);
-
 	server->players = g_slist_append(server->players, player);
 
 	/* Assign player to session without current player */
-- 
1.7.11.4


  parent reply	other threads:[~2012-10-05 21:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 21:20 [PATCH BlueZ 1/9] gdbus: Remove connection from g_dbus_remove_watch Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 2/9] Fix passing D-Bus connection to g_dbus_remove_watch Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 3/9] audio: Fix not freeing gateway agent data on exit Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 4/9] AVCTP: Simplify channel handling Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 5/9] AVCTP: Allocate memory to hold incoming/outgoing PDUs Luiz Augusto von Dentz
2012-10-05 21:20 ` Luiz Augusto von Dentz [this message]
2012-10-05 21:20 ` [PATCH BlueZ 7/9] AVRCP: Don't respond with errors when no player is registered Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 8/9] AVRCP: Fix crash on disconnect Luiz Augusto von Dentz
2012-10-05 21:20 ` [PATCH BlueZ 9/9] AVRCP: Simplify state_changed callback Luiz Augusto von Dentz
2012-10-06 13:40 ` [PATCH BlueZ 1/9] gdbus: Remove connection from g_dbus_remove_watch Marcel Holtmann
2012-10-06 15:09   ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1349472050-25928-6-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox