Commit 11d8f21b authored by Dan Williams's avatar Dan Williams
Browse files

wifi: fix some warnings caused by hidden SSID patches (23a5ae2f) (rh #1069844)

It could also cause nm_device_connection_is_available() to return TRUE
for wifi devices, for connections that were not wifi.
parent b02353e9
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment