From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 1/3] Fix not stopping name resolving when discovery is suspended
Date: Mon, 14 Feb 2011 12:21:20 +0200 [thread overview]
Message-ID: <1297678882-26893-1-git-send-email-luiz.dentz@gmail.com> (raw)
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
During device creation if discovery is active we suspend it to avoid
interfering with pairing, but although it attempt to cancel name request
there could be one already completed which would cause next name on the
list to be requested.
---
src/adapter.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 3e609c1..fd4b685 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -268,6 +268,10 @@ int adapter_resolve_names(struct btd_adapter *adapter)
struct remote_dev_info *dev, match;
int err;
+ /* Do not attempt to resolve more names if on suspended state */
+ if (adapter->state & STATE_SUSPENDED)
+ return 0;
+
memset(&match, 0, sizeof(struct remote_dev_info));
bacpy(&match.bdaddr, BDADDR_ANY);
match.name_status = NAME_REQUIRED;
--
1.7.1
next reply other threads:[~2011-02-14 10:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 10:21 Luiz Augusto von Dentz [this message]
2011-02-14 10:21 ` [PATCH 2/3] Fix not resetting indicators whenever the driver is initialized Luiz Augusto von Dentz
2011-02-14 10:26 ` Luiz Augusto von Dentz
2011-02-14 10:21 ` [PATCH 3/3] Fix not updating call indicator when parsing call info reply Luiz Augusto von Dentz
2011-02-15 14:14 ` [PATCH 1/3] Fix not stopping name resolving when discovery is suspended 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=1297678882-26893-1-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@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