mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 15:50:07 +01:00
It could also cause nm_device_connection_is_available() to return TRUE for wifi devices, for connections that were not wifi.
This commit is contained in:
parent
b02353e954
commit
11d8f21b68
2 changed files with 5 additions and 3 deletions
|
|
@ -1060,6 +1060,9 @@ _internal_check_connection_available (NMDevice *device,
|
|||
const char *mode;
|
||||
GSList *ap_iter = NULL;
|
||||
|
||||
s_wifi = nm_connection_get_setting_wireless (connection);
|
||||
g_return_val_if_fail (s_wifi, FALSE);
|
||||
|
||||
if (specific_object) {
|
||||
NMAccessPoint *ap;
|
||||
|
||||
|
|
@ -1067,8 +1070,6 @@ _internal_check_connection_available (NMDevice *device,
|
|||
return ap ? nm_ap_check_compatible (ap, connection) : FALSE;
|
||||
}
|
||||
|
||||
s_wifi = nm_connection_get_setting_wireless (connection);
|
||||
|
||||
/* Ad-Hoc and AP connections are always available because they may be
|
||||
* started at any time.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -7177,7 +7177,8 @@ nm_device_connection_is_available (NMDevice *device,
|
|||
* activating but the network isn't available let the device recheck
|
||||
* availability.
|
||||
*/
|
||||
if (NM_DEVICE_GET_CLASS (device)->check_connection_available_wifi_hidden)
|
||||
if ( nm_device_check_connection_compatible (device, connection, NULL)
|
||||
&& NM_DEVICE_GET_CLASS (device)->check_connection_available_wifi_hidden)
|
||||
available = NM_DEVICE_GET_CLASS (device)->check_connection_available_wifi_hidden (device, connection);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue