From: Johan Hedberg <johan.hedberg@gmail.com>
To: BlueZ development <linux-bluetooth@vger.kernel.org>
Subject: Re: HBH-PV270 headset get locked
Date: Tue, 25 Nov 2008 11:15:59 +0200 [thread overview]
Message-ID: <C2133416-B233-4FFF-B29B-0BCF3B3402E1@gmail.com> (raw)
In-Reply-To: <492BB3F2.3050005@gmail.com>
Hi,
Thanks for taking the time to investigate this.
On Nov 25, 2008, at 10:14, Sam Lin wrote:
> I traced code and found in some case headset is not unlocked well.
> for example when something goes wrong in headset_resume_complete(),
> client->dev = NULL
>
> so client_cb() will skip headset_unlock()
>
> then headset will be locked forever until restart bluetoothd.
>
> I have no idea what's the lock idea behind, BTW still unclear how the
> problem happens to cause this.
The lock part is used for making sure that only one unix socket client
can have read or write access to a remote device at a time. The part
that's setting client->dev to NULL seems definitely wrong to me but
I'll let Luiz comment on it before making any changes (since according
to git blame he was the last one to touch this part of the code). The
A2DP resume function has similar logic so it probably needs fixing too.
Johan
next prev parent reply other threads:[~2008-11-25 9:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 4:10 HBH-PV270 headset get locked Sam Lin
2008-11-25 8:14 ` Sam Lin
2008-11-25 9:15 ` Johan Hedberg [this message]
2008-11-25 14:34 ` Luiz Augusto von Dentz
2008-11-26 0:09 ` Sam Lin
2008-11-26 10:06 ` Sam Lin
2008-11-26 13:05 ` Johan Hedberg
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=C2133416-B233-4FFF-B29B-0BCF3B3402E1@gmail.com \
--to=johan.hedberg@gmail.com \
--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