* [PATCH BlueZ] AVRCP: Fix crash when MediaPlayer1 is disabled
@ 2013-01-11 14:19 Luiz Augusto von Dentz
2013-01-11 14:28 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2013-01-11 14:19 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When MediaPlayer1 is disabled we should not proceed with getting
remote capabilities but switch back to 1.0 mode.
---
profiles/audio/avrcp.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index d0cc346..ef324b0 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2178,11 +2178,12 @@ static void session_ct_init(struct avrcp *session)
path = device_get_path(session->dev->btd_dev);
mp = media_player_controller_create(path);
- if (mp != NULL) {
- media_player_set_callbacks(mp, &ct_cbs, player);
- player->user_data = mp;
- player->destroy = (GDestroyNotify) media_player_destroy;
- }
+ if (mp == NULL)
+ return;
+
+ media_player_set_callbacks(mp, &ct_cbs, player);
+ player->user_data = mp;
+ player->destroy = (GDestroyNotify) media_player_destroy;
if (session->version < 0x0103)
return;
--
1.8.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-11 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 14:19 [PATCH BlueZ] AVRCP: Fix crash when MediaPlayer1 is disabled Luiz Augusto von Dentz
2013-01-11 14:28 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).