Fix mode setting for non-encrypted ad-hoc networks
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@343 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1565,7 +1565,7 @@ static gboolean nm_device_set_wireless_config (NMDevice *dev, NMAccessPoint *ap,
|
|||||||
|
|
||||||
nm_device_set_essid (dev, essid);
|
nm_device_set_essid (dev, essid);
|
||||||
|
|
||||||
syslog (LOG_INFO, "nm_device_wireless_activate(%s) using essid '%s', with %s authentication.",
|
syslog (LOG_INFO, "nm_device_set_wireless_config (%s) using essid '%s', with %s authentication.",
|
||||||
nm_device_get_iface (dev), essid, (auth == NM_DEVICE_AUTH_METHOD_NONE) ? "no" :
|
nm_device_get_iface (dev), essid, (auth == NM_DEVICE_AUTH_METHOD_NONE) ? "no" :
|
||||||
((auth == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM) ? "Open System" :
|
((auth == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM) ? "Open System" :
|
||||||
((auth == NM_DEVICE_AUTH_METHOD_SHARED_KEY) ? "Shared Key" : "unknown")));
|
((auth == NM_DEVICE_AUTH_METHOD_SHARED_KEY) ? "Shared Key" : "unknown")));
|
||||||
@@ -1744,7 +1744,11 @@ get_ap:
|
|||||||
/* If its unencrypted and we don't have a link, we can't use this AP.
|
/* If its unencrypted and we don't have a link, we can't use this AP.
|
||||||
* If we can't get an IP address off this AP, we can't use it either.
|
* If we can't get an IP address off this AP, we can't use it either.
|
||||||
*/
|
*/
|
||||||
if (!HAVE_LINK (dev) || !nm_device_activation_configure_ip (dev, FALSE))
|
if (nm_ap_get_mode (best_ap) == NETWORK_MODE_ADHOC)
|
||||||
|
{
|
||||||
|
success = nm_device_activation_configure_ip (dev, TRUE);
|
||||||
|
}
|
||||||
|
else if (!HAVE_LINK (dev) || !nm_device_activation_configure_ip (dev, FALSE))
|
||||||
{
|
{
|
||||||
syslog (LOG_DEBUG, "nm_device_activate_wireless(%s): no link to '%s', or couldn't get configure interface for IP. Trying another access point.",
|
syslog (LOG_DEBUG, "nm_device_activate_wireless(%s): no link to '%s', or couldn't get configure interface for IP. Trying another access point.",
|
||||||
nm_device_get_iface (dev), nm_ap_get_essid (best_ap) ? nm_ap_get_essid (best_ap) : "(none)");
|
nm_device_get_iface (dev), nm_ap_get_essid (best_ap) ? nm_ap_get_essid (best_ap) : "(none)");
|
||||||
@@ -1754,7 +1758,8 @@ get_ap:
|
|||||||
nm_device_update_best_ap (dev);
|
nm_device_update_best_ap (dev);
|
||||||
goto get_ap;
|
goto get_ap;
|
||||||
}
|
}
|
||||||
success = TRUE;
|
else
|
||||||
|
success = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user