diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-01-21 15:06:47 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-03-11 11:39:47 +0200 |
commit | b36f7cd78806c2738bcdf727d6d97f473f42f80e (patch) | |
tree | f265d4235d7c278838b20d145f0cc297d75b1cec | |
parent | 96174d78762c4ad2a7eb83fc5c9784dea10122f5 (diff) | |
download | bluez-b36f7cd78806c2738bcdf727d6d97f473f42f80e.tar.gz |
audio/avrcp: Fix not always requesting capabilities
This fixes not requesting capabilities of targets that are not player
category, instead just make the creation of the player object
conditional to the category 1 so that GetCapabities is still sent in
order to fetch the supported events which might be still useful even
without a player.
-rw-r--r-- | profiles/audio/avrcp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 68cc67753..0c3a761b2 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3883,12 +3883,11 @@ static void controller_init(struct avrcp *session) btd_service_connecting_complete(service, 0); /* Only create player if category 1 is supported */ - if (!(controller->features & AVRCP_FEATURE_CATEGORY_1)) - return; - - player = create_ct_player(session, 0); - if (player == NULL) - return; + if (controller->features & AVRCP_FEATURE_CATEGORY_1) { + player = create_ct_player(session, 0); + if (player == NULL) + return; + } if (controller->version < 0x0103) return; |