From 958024cb684a08103aa2116dca0f627683ebe9ac Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 13 Sep 2010 11:02:26 -0500 Subject: [PATCH] bluetooth: requery default adapter when Bluez actually starts --- src/bluez-manager/nm-bluez-manager.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bluez-manager/nm-bluez-manager.c b/src/bluez-manager/nm-bluez-manager.c index fe027c4ff5..59849d3bd5 100644 --- a/src/bluez-manager/nm-bluez-manager.c +++ b/src/bluez-manager/nm-bluez-manager.c @@ -251,11 +251,13 @@ name_owner_changed_cb (NMDBusManager *dbus_mgr, gboolean old_owner_good = (old_owner && strlen (old_owner)); gboolean new_owner_good = (new_owner && strlen (new_owner)); - /* Can't handle the signal if its not from the supplicant service */ + /* Can't handle the signal if its not from the Bluez */ if (strcmp (BLUEZ_SERVICE, name)) return; - if (old_owner_good && !new_owner_good) + if (!old_owner_good && new_owner_good) + query_default_adapter (self); + else if (old_owner_good && !new_owner_good) remove_all_devices (self, TRUE); }