public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix spurious DeviceDisappeared signals after name resolution
@ 2010-12-23 17:39 Anderson Lizardo
  2010-12-23 19:09 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2010-12-23 17:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

update_oor_devices() was being called twice, first after a inquiry, then
after name resolution. This caused the just found devices to be always
reported as "disappeared" after name resolution.
---
 src/adapter.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 69d3da0..096d684 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2641,13 +2641,14 @@ void adapter_set_state(struct btd_adapter *adapter, int state)
 	}
 
 	if (discov_active == FALSE) {
-		update_oor_devices(adapter);
 		if (type & DISC_RESOLVNAME) {
 			if (adapter_resolve_names(adapter) == 0) {
 				adapter->state |= STATE_RESOLVNAME;
 				return;
 			}
 		}
+
+		update_oor_devices(adapter);
 	} else if (adapter->disc_sessions && main_opts.discov_interval)
 			adapter->scheduler_id = g_timeout_add_seconds(
 						main_opts.discov_interval,
-- 
1.7.0.4


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

* Re: [PATCH] Fix spurious DeviceDisappeared signals after name resolution
  2010-12-23 17:39 [PATCH] Fix spurious DeviceDisappeared signals after name resolution Anderson Lizardo
@ 2010-12-23 19:09 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-12-23 19:09 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth

Hi Lizardo,

On Thu, Dec 23, 2010, Anderson Lizardo wrote:
> update_oor_devices() was being called twice, first after a inquiry, then
> after name resolution. This caused the just found devices to be always
> reported as "disappeared" after name resolution.
> ---
>  src/adapter.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Thanks. Pushed upstream.

Johan

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

end of thread, other threads:[~2010-12-23 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23 17:39 [PATCH] Fix spurious DeviceDisappeared signals after name resolution Anderson Lizardo
2010-12-23 19:09 ` Johan Hedberg

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