From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 1/3] adapter: Fix not waiting for start discovery result
Date: Thu, 14 Sep 2017 17:57:22 -0700 [thread overview]
Message-ID: <87shfoixsd.fsf@intel.com> (raw)
In-Reply-To: <20170914131509.13624-1-luiz.dentz@gmail.com>
Hi Luiz,
Luiz Augusto von Dentz <luiz.dentz@gmail.com> writes:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> We should not reply until the start discovery completes otherwise
> clients may attempt to stop the discovery before it even has started.
>
> On top of this it will now block clients so they so not be able to
> queue more requests.
> ---
> src/adapter.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 47 insertions(+), 8 deletions(-)
>
> diff --git a/src/adapter.c b/src/adapter.c
> index a571b1870..4b9f5a1cd 100644
> --- a/src/adapter.c
> +++ b/src/adapter.c
> @@ -160,6 +160,7 @@ struct discovery_filter {
>
> struct watch_client {
> struct btd_adapter *adapter;
> + DBusMessage *msg;
> char *owner;
> guint watch;
> struct discovery_filter *discovery_filter;
> @@ -1421,13 +1422,17 @@ static void start_discovery_complete(uint8_t status, uint16_t length,
> const void *param, void *user_data)
> {
> struct btd_adapter *adapter = user_data;
> + struct watch_client *client = adapter->discovery_list->data;
What if the client exits the bus after issuing StartDiscovery(), but
before receiving the reply. It seems that 'adapter->discovery_list'
could be empty, no?
Cheers,
--
Vinicius
next prev parent reply other threads:[~2017-09-15 0:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-14 13:15 [PATCH BlueZ 1/3] adapter: Fix not waiting for start discovery result Luiz Augusto von Dentz
2017-09-14 13:15 ` [PATCH BlueZ 2/3] adapter: Fix not waiting for stop " Luiz Augusto von Dentz
2017-09-14 13:15 ` [PATCH BlueZ 3/3] adapter: Refactor code around discovery Luiz Augusto von Dentz
2017-09-15 0:57 ` Vinicius Costa Gomes [this message]
2017-09-15 7:44 ` [PATCH BlueZ 1/3] adapter: Fix not waiting for start discovery result 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=87shfoixsd.fsf@intel.com \
--to=vinicius.gomes@intel.com \
--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