From 7be2627b698531f0db1014e2708c1c2db3dee191 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 21 Apr 2014 14:48:09 -0500 Subject: [PATCH] wifi: remove supplicant pending action if supplicant init fails If the supplicant interface object never successfully initialized, remove the pending action to prevent warnings about "pending action already added" when supplicant_interface_acquire() adds the pending action again. --- src/devices/wifi/nm-device-wifi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index d3b0bcf4c0..24403eaaad 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -2336,6 +2336,9 @@ supplicant_iface_state_cb (NMSupplicantInterface *iface, case NM_SUPPLICANT_INTERFACE_STATE_DOWN: cleanup_association_attempt (self, FALSE); + if (old_state < NM_SUPPLICANT_INTERFACE_STATE_READY) + nm_device_remove_pending_action (device, "waiting for supplicant", TRUE); + /* If the device is already in UNAVAILABLE state then the state change * is a NOP and the interface won't be re-acquired in the device state * change handler. So ensure we have a new one here so that we're