Re: [PATCH 6/7] AVRCP: Do not list values for unsupported attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lucas,

On Mon, Oct 10, 2011 at 3:37 PM, Lucas De Marchi
<lucas.demarchi@xxxxxxxxxxxxxx> wrote:
> ---
>  audio/avrcp.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/audio/avrcp.c b/audio/avrcp.c
> index ea175e3..0d9b6d0 100644
> --- a/audio/avrcp.c
> +++ b/audio/avrcp.c
> @@ -565,11 +565,10 @@ static uint8_t avrcp_handle_list_player_values(struct avrcp_player *player,
>        if (len != 1 || !player)
>                goto err;
>
> -       len = attr_get_max_val(pdu->params[0]);
> -       if (!len) {
> -               error("Attribute is invalid: %u", pdu->params[0]);
> +       if (player_get_attribute(player, pdu->params[0]) < 0)
>                goto err;
> -       }
> +
> +       len = attr_get_max_val(pdu->params[0]);
>
>        for (i = 1; i <= len; i++)
>                pdu->params[i] = i;
> --
> 1.7.7

Ack.

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux