From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: Alex Deymo <deymo@chromium.org>
Cc: keybuk <keybuk@chromium.org>,
linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: a2dp.c: finalize_config(setup) can destroy setup
Date: Fri, 17 May 2013 09:47:44 +0300 [thread overview]
Message-ID: <CABBYNZKmuPbRywcZniFcGPmZBGn78ucKretDn12=9KukREy4jQ@mail.gmail.com> (raw)
In-Reply-To: <CAGd9gwhOurO91q1EwJwZbTVthaxr2AjcVeZ47xuAY_S1Ft_u3w@mail.gmail.com>
Hi Alex,
On Thu, May 16, 2013 at 11:34 PM, Alex Deymo <deymo@chromium.org> wrote:
> 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?
Pushed, thanks for testing it.
--
Luiz Augusto von Dentz
prev parent reply other threads:[~2013-05-17 6:47 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
2013-05-17 6:47 ` Luiz Augusto von Dentz [this message]
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='CABBYNZKmuPbRywcZniFcGPmZBGn78ucKretDn12=9KukREy4jQ@mail.gmail.com' \
--to=luiz.dentz@gmail.com \
--cc=deymo@chromium.org \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.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 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).