If previously powered off then don't enable when leaving offline mode
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Jul 2009 12:30:36 +0000 (14:30 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 22 Jul 2009 12:30:36 +0000 (14:30 +0200)
src/device.c

index 044aef5..ad44c7c 100644 (file)
@@ -1554,6 +1554,9 @@ static void set_offlinemode(struct connman_element *element, gpointer user_data)
        if (device->powered == powered)
                return;
 
+       if (device->powered_persistent == FALSE)
+               powered = FALSE;
+
        set_powered(device, powered);
 }