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:
@@ -1060,6 +1060,9 @@ _internal_check_connection_available (NMDevice *device,
|
|||||||
const char *mode;
|
const char *mode;
|
||||||
GSList *ap_iter = NULL;
|
GSList *ap_iter = NULL;
|
||||||
|
|
||||||
|
s_wifi = nm_connection_get_setting_wireless (connection);
|
||||||
|
g_return_val_if_fail (s_wifi, FALSE);
|
||||||
|
|
||||||
if (specific_object) {
|
if (specific_object) {
|
||||||
NMAccessPoint *ap;
|
NMAccessPoint *ap;
|
||||||
|
|
||||||
@@ -1067,8 +1070,6 @@ _internal_check_connection_available (NMDevice *device,
|
|||||||
return ap ? nm_ap_check_compatible (ap, connection) : FALSE;
|
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
|
/* Ad-Hoc and AP connections are always available because they may be
|
||||||
* started at any time.
|
* 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
|
* activating but the network isn't available let the device recheck
|
||||||
* availability.
|
* 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);
|
available = NM_DEVICE_GET_CLASS (device)->check_connection_available_wifi_hidden (device, connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user