From: Alex Deymo <deymo@chromium.org>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: keybuk <keybuk@chromium.org>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: a2dp.c: finalize_config(setup) can destroy setup
Date: Thu, 16 May 2013 13:34:24 -0700 [thread overview]
Message-ID: <CAGd9gwhOurO91q1EwJwZbTVthaxr2AjcVeZ47xuAY_S1Ft_u3w@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZLz=nP5fouBQw0oUYe_L4SOX3jPoQtkATYGispvs8dh_w@mail.gmail.com>
Hi Luiz,
On Thu, May 16, 2013 at 4:02 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Looks like there are some new devices that should try to get a hold,
> anyway this problem should be fixed ASAP so what about the following
> patch:
>
> diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
> index 215f4db..c6973ae 100644
> --- a/profiles/audio/a2dp.c
> +++ b/profiles/audio/a2dp.c
> @@ -723,16 +723,12 @@ static void open_cfm(struct avdtp *session,
> struct avdtp_local_sep *sep,
> if (err) {
> setup->stream = NULL;
> setup->err = err;
> + if (setup->start)
> + finalize_resume(setup);
> }
>
> finalize_config(setup);
>
> - if (!setup->start || !err)
> - return;
> -
> - setup->start = FALSE;
> - finalize_resume(setup);
> -
> return;
> }
This patch looks good to me. I tried it in the same scenario and
valgrind does not complain.
Could you please push it to the repo?
Thanks,
Alex.
next prev parent reply other threads:[~2013-05-16 20:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGd9gwgKMt21TnGLJ09+gAkP-=Jn9mfoAThiBuqup_vTyCshuw@mail.gmail.com>
2013-05-16 4:06 ` Fwd: a2dp.c: finalize_config(setup) can destroy setup Alex Deymo
2013-05-16 11:02 ` Luiz Augusto von Dentz
2013-05-16 20:34 ` Alex Deymo [this message]
2013-05-17 6:47 ` Luiz Augusto von Dentz
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=CAGd9gwhOurO91q1EwJwZbTVthaxr2AjcVeZ47xuAY_S1Ft_u3w@mail.gmail.com \
--to=deymo@chromium.org \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/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 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).