Commit a0998bbb 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
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
parent 5b5ec953
Pipeline #37203 passed with stages
in 8 minutes and 29 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