* [PATCH 1/2 v3] Fix creating device object when connection fails
@ 2011-02-01 8:28 Luiz Augusto von Dentz
2011-02-01 8:30 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2011-02-01 8:28 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 since there is no connection and
the device is not permanent/paired.
---
src/event.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/event.c b/src/event.c
index ff768c0..cbaf9d7 100644
--- a/src/event.c
+++ b/src/event.c
@@ -676,7 +676,12 @@ void btd_event_conn_failed(bdaddr_t *local, bdaddr_t *peer, uint8_t status)
struct btd_device *device;
DBusConnection *conn = get_dbus_connection();
- if (!get_adapter_and_device(local, peer, &adapter, &device, TRUE))
+ DBG("status 0x%02x", status);
+
+ if (!get_adapter_and_device(local, peer, &adapter, &device, FALSE))
+ return;
+
+ if (!device)
return;
if (device_is_temporary(device))
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2 v3] Fix creating device object when connection fails
2011-02-01 8:28 [PATCH 1/2 v3] Fix creating device object when connection fails Luiz Augusto von Dentz
@ 2011-02-01 8:30 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-02-01 8:30 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hi Luiz,
On Tue, Feb 01, 2011, Luiz Augusto von Dentz wrote:
> There is no need to create a new object since there is no connection and
> the device is not permanent/paired.
> ---
> src/event.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
Thanks. This one has been pushed upstream now. I'll skip 2/2 since it
should never happen that there's a connection without a corresponding
device object.
Johan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-01 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 8:28 [PATCH 1/2 v3] Fix creating device object when connection fails Luiz Augusto von Dentz
2011-02-01 8:30 ` 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).