wifi: fix AP mode check in nm_ap_check_compatible()

AP can only be compatible with "ap"-mode connection when both mode is INFRA and
hotspot flag is set.
This commit is contained in:
Jiří Klimeš 2012-11-01 14:34:34 +01:00
parent aa8c3d72d6
commit a44d36e628

View file

@ -1172,8 +1172,7 @@ nm_ap_check_compatible (NMAccessPoint *self,
if (!strcmp (mode, "adhoc") && (priv->mode != NM_802_11_MODE_ADHOC))
return FALSE;
if ( !strcmp (mode, "ap")
&& (priv->mode != NM_802_11_MODE_INFRA)
&& (priv->hotspot != TRUE))
&& (priv->mode != NM_802_11_MODE_INFRA || priv->hotspot != TRUE))
return FALSE;
}