2008-11-02 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerAP.c
		- (nm_ap_new_fake_from_connection): treat only lack of a wireless security
			setting as unencrypted; fixes a bug where NM wouldn't ask for new
			secrets when connecting to an encrypted network failed



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4244 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-11-02 22:56:10 +00:00
parent 4fa7c20784
commit c509752fde
2 changed files with 10 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2008-11-02 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerAP.c
- (nm_ap_new_fake_from_connection): treat only lack of a wireless security
setting as unencrypted; fixes a bug where NM wouldn't ask for new
secrets when connecting to an encrypted network failed
2008-10-30 Dan Williams <dcbw@redhat.com>
* libnm-util/libnm-util.ver

View File

@ -598,6 +598,7 @@ nm_ap_new_fake_from_connection (NMConnection *connection)
s_wireless_sec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection,
NM_TYPE_SETTING_WIRELESS_SECURITY));
/* Assume presence of a security setting means the AP is encrypted */
if (!s_wireless_sec)
goto done;
@ -605,15 +606,9 @@ nm_ap_new_fake_from_connection (NMConnection *connection)
key_mgmt = nm_setting_wireless_security_get_key_mgmt (s_wireless_sec);
/* Static WEP or no security */
/* Static WEP */
if (!strcmp (key_mgmt, "none")) {
/* static wep? */
if ( nm_setting_wireless_security_get_wep_key (s_wireless_sec, 0)
|| nm_setting_wireless_security_get_wep_key (s_wireless_sec, 1)
|| nm_setting_wireless_security_get_wep_key (s_wireless_sec, 2)
|| nm_setting_wireless_security_get_wep_key (s_wireless_sec, 3))
nm_ap_set_flags (ap, flags | NM_802_11_AP_FLAGS_PRIVACY);
nm_ap_set_flags (ap, flags | NM_802_11_AP_FLAGS_PRIVACY);
goto done;
}