[gnome-control-center/gnome-3-30] wifi: Disable periodic scan only when Wi-Fi is disabled



commit f58fc2c58a500a7678cf048bc57fbd5315b64def
Author: Jonathan Kang <jonathankang gnome org>
Date:   Tue Oct 23 06:56:09 2018 +0000

    wifi: Disable periodic scan only when Wi-Fi is disabled
    
    The periodic Wi-Fi scan is introduced in 84279c4a. It's designed to
    scan the Wi-Fi list every 15 seconds and disable the scan when Wi-Fi is
    disabled.
    
    But currently the periodic check is disabled every time
    wireless_enabled_toggled() is called, which is wrong. Because it can
    mean Wi-Fi is enabled or disabled.
    
    Fix that by disabling periodic scan only when Wi-Fi is disabled.
    
    fixes 84279c4a
    
    
    (cherry picked from commit a0998bbb03d3fc5c133652435ce72ad3ca0869d4)

 panels/network/net-device-wifi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/panels/network/net-device-wifi.c b/panels/network/net-device-wifi.c
index 3d3a54d80..4290ac79a 100644
--- a/panels/network/net-device-wifi.c
+++ b/panels/network/net-device-wifi.c
@@ -342,7 +342,8 @@ wireless_enabled_toggled (NMClient       *client,
 
         device_wifi->priv->updating_device = TRUE;
         gtk_switch_set_active (sw, enabled);
-        disable_scan_timeout (device_wifi);
+        if (!enabled)
+                disable_scan_timeout (device_wifi);
         device_wifi->priv->updating_device = FALSE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]