device: Ensure P2P device is unavailable without wpa_supplicant

Put the device into UNAVAILABLE state when the corresponding WPA
supplicant management interface is unset. This is important to
explicitly clear any pending state changes that are not permissible when
there is no management interface.
This commit is contained in:
Benjamin Berg 2019-02-19 12:57:59 +01:00
parent 10600bdb69
commit 27bc2cb22a

View file

@ -945,6 +945,10 @@ supplicant_interfaces_release (NMDeviceWifiP2P *self, gboolean set_is_waiting)
supplicant_group_interface_release (self);
nm_device_state_changed (NM_DEVICE (self),
NM_DEVICE_STATE_UNAVAILABLE,
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
if (set_is_waiting)
_set_is_waiting_for_supplicant (self, TRUE);
}