Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/3] Fix not stopping name resolving when discovery is suspended
@ 2011-02-14 10:21 Luiz Augusto von Dentz
  2011-02-14 10:21 ` [PATCH 2/3] Fix not resetting indicators whenever the driver is initialized Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2011-02-14 10:21 UTC (permalink / raw)
  To: linux-bluetooth

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-15 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-14 10:21 [PATCH 1/3] Fix not stopping name resolving when discovery is suspended Luiz Augusto von Dentz
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox