mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
iwd: in prepare stage check that matching AP exists
Check the return value of nm_wifi_aps_find_first_compatible in act_stage1_prepare. Also a small formatting fix.
This commit is contained in:
parent
d01ba607a6
commit
0876332bae
1 changed files with 5 additions and 7 deletions
|
|
@ -1219,15 +1219,13 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
||||||
ap = ap_path ? nm_wifi_ap_lookup_for_device (NM_DEVICE (self), ap_path) : NULL;
|
ap = ap_path ? nm_wifi_ap_lookup_for_device (NM_DEVICE (self), ap_path) : NULL;
|
||||||
if (!ap) {
|
if (!ap) {
|
||||||
ap = nm_wifi_aps_find_first_compatible (&priv->aps_lst_head, connection);
|
ap = nm_wifi_aps_find_first_compatible (&priv->aps_lst_head, connection);
|
||||||
|
if (!ap) {
|
||||||
/* TODO: assuming hidden networks aren't supported do we need
|
NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED);
|
||||||
* to consider the case of APs that are not in the scan list
|
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||||
* yet, for which nm-device-wifi.c creates the temporary fake
|
}
|
||||||
* AP object?
|
|
||||||
*/
|
|
||||||
|
|
||||||
nm_active_connection_set_specific_object (NM_ACTIVE_CONNECTION (req),
|
nm_active_connection_set_specific_object (NM_ACTIVE_CONNECTION (req),
|
||||||
nm_dbus_object_get_path (NM_DBUS_OBJECT (ap)));
|
nm_dbus_object_get_path (NM_DBUS_OBJECT (ap)));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_current_ap (self, ap, FALSE);
|
set_current_ap (self, ap, FALSE);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue