diff options
author | Thomas Haller <thaller@redhat.com> | 2017-01-27 13:55:41 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-02-10 14:40:23 +0100 |
commit | 252e95c1130d6864489c6b27005566d02303090f (patch) | |
tree | 0ac6d3eb1ad7bc6d1eadaea2f1a6593aaa849e24 | |
parent | 11744b090ea0f6e7d1f71c936e76588b4c7ea347 (diff) | |
download | NetworkManager-252e95c1130d6864489c6b27005566d02303090f.tar.gz |
device: queue recheck-available before removing "wait for supplicant" pending action
While we still recheck-available, we want to queue a pending action to block
startup-complete. However, we have to queue that before removing the pending
action for "wait for supplicant".
<debug> [...] device[0x563abbcca400] (wlp2s0): remove_pending_action (0): 'waiting for supplicant'
<info> [...] manager: startup complete
<debug> [...] device[0x563abbcca400] (wlp2s0): add_pending_action (1): 'queued state change to disconnected'
-rw-r--r-- | src/devices/wifi/nm-device-wifi.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 05672b4b0f..e7dc92c8db 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -2022,7 +2022,6 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, NMDevice *device = NM_DEVICE (self); NMDeviceState devstate; gboolean scanning; - gboolean recheck_available = FALSE; if (new_state == old_state) return; @@ -2043,7 +2042,9 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, switch (new_state) { case NM_SUPPLICANT_INTERFACE_STATE_READY: _LOGD (LOGD_WIFI_SCAN, "supplicant ready"); - recheck_available = TRUE; + nm_device_queue_recheck_available (NM_DEVICE (device), + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); priv->scan_interval = SCAN_INTERVAL_MIN; if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) nm_device_remove_pending_action (device, "waiting for supplicant", TRUE); @@ -2104,7 +2105,9 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, } break; case NM_SUPPLICANT_INTERFACE_STATE_DOWN: - recheck_available = TRUE; + nm_device_queue_recheck_available (NM_DEVICE (device), + NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); cleanup_association_attempt (self, FALSE); if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) @@ -2129,12 +2132,6 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, break; } - if (recheck_available) { - nm_device_queue_recheck_available (NM_DEVICE (device), - NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE, - NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); - } - /* Signal scanning state changes */ if ( new_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING || old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING) |