Commit f58fc2c5 authored by Jonathan Kang's avatar Jonathan Kang Committed by Georges Basile Stavracas Neto

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

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 a0998bbb)
parent 98a21927
Pipeline #37204 passed with stages
in 11 minutes and 30 seconds
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment