network-manager-applet r623 - in trunk: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: network-manager-applet r623 - in trunk: . src
- Date: Sun, 30 Mar 2008 20:43:45 +0100 (BST)
Author: dcbw
Date: Sun Mar 30 20:43:45 2008
New Revision: 623
URL: http://svn.gnome.org/viewvc/network-manager-applet?rev=623&view=rev
Log:
2008-03-30 Dan Williams <dcbw redhat com>
* src/wireless-dialog.c
- (get_default_type_for_security): unencrypted connections shouldn't
have a wireless-security setting
- (security_combo_init): don't set the wireless-security setting if
security isn't specified in the wireless setting
- (nma_wireless_dialog_get_connection): handle unencrypted connections
better
Modified:
trunk/ChangeLog
trunk/src/wireless-dialog.c
Modified: trunk/src/wireless-dialog.c
==============================================================================
--- trunk/src/wireless-dialog.c (original)
+++ trunk/src/wireless-dialog.c Sun Mar 30 20:43:45 2008
@@ -351,20 +351,8 @@
g_return_val_if_fail (sec != NULL, NMU_SEC_NONE);
/* No IEEE 802.1x */
- if (!strcmp (sec->key_mgmt, "none")) {
- /* Static WEP */
- if ( sec->wep_tx_keyidx
- || sec->wep_key0
- || sec->wep_key1
- || sec->wep_key2
- || sec->wep_key3
- || (ap_flags & NM_802_11_AP_FLAGS_PRIVACY)
- || (sec->auth_alg && !strcmp (sec->auth_alg, "shared")))
- return NMU_SEC_STATIC_WEP;
-
- /* Unencrypted */
- return NMU_SEC_NONE;
- }
+ if (!strcmp (sec->key_mgmt, "none"))
+ return NMU_SEC_STATIC_WEP;
if ( !strcmp (sec->key_mgmt, "ieee8021x")
&& (ap_flags & NM_802_11_AP_FLAGS_PRIVACY)) {
@@ -458,7 +446,9 @@
wsec = NM_SETTING_WIRELESS_SECURITY (nm_connection_get_setting (connection,
NM_TYPE_SETTING_WIRELESS_SECURITY));
- if (wsec && s_wireless->security && !strcmp (s_wireless->security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
+ if (!s_wireless->security || strcmp (s_wireless->security, NM_SETTING_WIRELESS_SECURITY_SETTING_NAME))
+ wsec = NULL;
+ if (wsec)
default_type = get_default_type_for_security (wsec, ap_flags, dev_caps);
}
@@ -748,6 +738,15 @@
if (sec) {
wireless_security_fill_connection (sec, connection);
wireless_security_unref (sec);
+ } else {
+ /* Unencrypted */
+ s_wireless = NM_SETTING_WIRELESS (nm_connection_get_setting (connection, NM_TYPE_SETTING_WIRELESS));
+ g_assert (s_wireless);
+
+ if (s_wireless->security) {
+ g_free (s_wireless->security);
+ s_wireless->security = NULL;
+ }
}
/* Fill device */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]