From: Zhao Forrest <forrest.zhao@gmail.com>
To: Johan Hedberg <johan.hedberg@nokia.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] in headset_init(), it's possible that hs->hfp_handle is not set, so we should not check hs->hfp_handle in headset_connect_cb()
Date: Wed, 6 May 2009 20:28:17 +0800 [thread overview]
Message-ID: <ac8af0be0905060528o6777bdc5l87399646d5471b2e@mail.gmail.com> (raw)
In-Reply-To: <20090506093049.GA31559@localhost>
>
> I don't see how that's a bug. hs->hfp_active should be true only when we
> are connected to HFP. server_is_enabled(src, HANDSFREE_SVCLASS_ID) is
> supposed to return true if HFP support is enabled in general. These are
> two separate things (we could be connected to HSP even though HFP support
> is enabled if the headset only supports HSP, i.e. hs->hfp_handle == 0 in
> this case).
>
Let me describe how the bug is triggered by the following steps in our
lab:
1 at HFP AW side bluetoothd is started, and headset_init() is called.
However btd_device_get_record() returns NULL, so hs->hfp_handle is
NULL.
2 at HFP HF unit side bluetoothd is started, and initiated connection to HFP AW
3 HFP AW accepts the connection, and headset_connect_cb() is called.
At this time hs->hfp_handle is NULL, so hs->hfp_active is set to
FALSE.
This way the bug is triggered: a real HFP connection is initiated by HFP HF
unit, but hs->hfp_active is set to FALSE by HFP AW. It seems that this patch
is not a real fix, could you share the ideas of fixing this bug?
Thanks,
Forrest
next prev parent reply other threads:[~2009-05-06 12:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 9:19 [PATCH] in headset_init(), it's possible that hs->hfp_handle is not set, so we should not check hs->hfp_handle in headset_connect_cb() Forrest Zhao
2009-05-06 9:30 ` Johan Hedberg
2009-05-06 12:28 ` Zhao Forrest [this message]
2009-05-07 2:03 ` Zhao Forrest
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=ac8af0be0905060528o6777bdc5l87399646d5471b2e@mail.gmail.com \
--to=forrest.zhao@gmail.com \
--cc=johan.hedberg@nokia.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