mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 19:20:12 +01: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;
|
||||
if (!ap) {
|
||||
ap = nm_wifi_aps_find_first_compatible (&priv->aps_lst_head, connection);
|
||||
|
||||
/* TODO: assuming hidden networks aren't supported do we need
|
||||
* to consider the case of APs that are not in the scan list
|
||||
* yet, for which nm-device-wifi.c creates the temporary fake
|
||||
* AP object?
|
||||
*/
|
||||
if (!ap) {
|
||||
NM_SET_OUT (out_failure_reason, NM_DEVICE_STATE_REASON_CONFIG_FAILED);
|
||||
return NM_ACT_STAGE_RETURN_FAILURE;
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue