summaryrefslogtreecommitdiff
path: root/src/bluez-manager/nm-bluez-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluez-manager/nm-bluez-manager.c')
-rw-r--r--src/bluez-manager/nm-bluez-manager.c6
1 files 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);
}