All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] handsfree-audio: Fix parsing of Register() CODECs
Date: Fri, 12 Apr 2013 18:18:39 -0500	[thread overview]
Message-ID: <5168964F.5060705@gmail.com> (raw)
In-Reply-To: <1365805553-11587-1-git-send-email-jprvita@openbossa.org>

[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]

Hi João Paulo,

On 04/12/2013 05:25 PM, João Paulo Rechi Vita wrote:
> Without this patch the mSBC CODEC is always enabled, even when the
> CODECs array in the Register() message from the agent contains only
> entry for the CVSD (0x01) CODEC.
> ---
>   src/handsfree-audio.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c
> index 1a1cbff..3b0814f 100644
> --- a/src/handsfree-audio.c
> +++ b/src/handsfree-audio.c
> @@ -682,9 +682,10 @@ static DBusMessage *am_agent_register(DBusConnection *conn,
>   		return __ofono_error_invalid_args(msg);
>
>   	for (i = 0; i<  length; i++) {
> -		if (codecs[i] == HFP_CODEC_CVSD)
> +		if (codecs[i] == HFP_CODEC_CVSD) {
>   			has_cvsd = TRUE;
> -		else if (codecs[i] != HFP_CODEC_MSBC)
> +			continue;
> +		} else if (codecs[i] != HFP_CODEC_MSBC)
>   			return __ofono_error_invalid_args(msg);
>
>   		if (defer_setup)

Good catch.  I'd prefer we fix Patch 7 in Vinicius' series instead of 
applying this patch though.

Regards,
-Denis

  reply	other threads:[~2013-04-12 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 22:25 [PATCH] handsfree-audio: Fix parsing of Register() CODECs =?unknown-8bit?q?Jo=C3=A3o?= Paulo Rechi Vita
2013-04-12 23:18 ` Denis Kenzior [this message]
2013-04-13  0:06   ` =?unknown-8bit?q?Jo=C3=A3o?= Paulo Rechi Vita
2013-04-13  4:13     ` Denis Kenzior
2013-04-15 13:16       ` =?unknown-8bit?q?Jo=C3=A3o?= Paulo Rechi Vita

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=5168964F.5060705@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.