diff mbox series

[BlueZ] avrcp: Handle not implemented response to AVRCP_LIST_PLAYER_ATTRIBUTES

Message ID 20200507210336.2703338-1-luiz.dentz@gmail.com (mailing list archive)
State New, archived
Headers show
Series [BlueZ] avrcp: Handle not implemented response to AVRCP_LIST_PLAYER_ATTRIBUTES | expand

Commit Message

Luiz Augusto von Dentz May 7, 2020, 9:03 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If remote device respond with ctype set to not implement don't continue
parsing the packet.
---
 profiles/audio/avrcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrey Semashev May 7, 2020, 11:51 p.m. UTC | #1
I think this patch is correct, but unfortunately, it doesn't solve the 
problem with the Sennheiser MTW2 reboot.

On 2020-05-08 00:03, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> If remote device respond with ctype set to not implement don't continue
> parsing the packet.
> ---
>   profiles/audio/avrcp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
> index 6b3f685d2..773ccdb60 100644
> --- a/profiles/audio/avrcp.c
> +++ b/profiles/audio/avrcp.c
> @@ -2223,7 +2223,7 @@ static gboolean avrcp_list_player_attributes_rsp(struct avctp *conn,
>   	uint8_t len, count = 0;
>   	int i;
>   
> -	if (code == AVC_CTYPE_REJECTED)
> +	if (code == AVC_CTYPE_REJECTED || code == AVC_CTYPE_NOT_IMPLEMENTED)
>   		return FALSE;
>   
>   	len = pdu->params[0];
>
diff mbox series

Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 6b3f685d2..773ccdb60 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -2223,7 +2223,7 @@  static gboolean avrcp_list_player_attributes_rsp(struct avctp *conn,
 	uint8_t len, count = 0;
 	int i;
 
-	if (code == AVC_CTYPE_REJECTED)
+	if (code == AVC_CTYPE_REJECTED || code == AVC_CTYPE_NOT_IMPLEMENTED)
 		return FALSE;
 
 	len = pdu->params[0];