* [PATCH] Fix creating device object on disconnect complete event
@ 2011-02-16 13:23 Luiz Augusto von Dentz
2011-02-16 15:03 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2011-02-16 13:23 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
There is no need to create a new object if disconnected and the device is
not permanent/paired.
---
src/event.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/event.c b/src/event.c
index b979a8e..ba8f84a 100644
--- a/src/event.c
+++ b/src/event.c
@@ -697,7 +697,10 @@ void btd_event_disconn_complete(bdaddr_t *local, bdaddr_t *peer)
DBG("");
- if (!get_adapter_and_device(local, peer, &adapter, &device, TRUE))
+ if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
+ return;
+
+ if (!device)
return;
adapter_remove_connection(adapter, device);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix creating device object on disconnect complete event
2011-02-16 13:23 [PATCH] Fix creating device object on disconnect complete event Luiz Augusto von Dentz
@ 2011-02-16 15:03 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-02-16 15:03 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Wed, Feb 16, 2011, Luiz Augusto von Dentz wrote:
> There is no need to create a new object if disconnected and the device is
> not permanent/paired.
> ---
> src/event.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
Pushed upstream. Thanks.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-16 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 13:23 [PATCH] Fix creating device object on disconnect complete event Luiz Augusto von Dentz
2011-02-16 15:03 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).