[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/knetworkmanager-4.1-openSUSE/libs/ui
From:       Helmut Schaa <hschaa () suse ! de>
Date:       2009-01-20 10:18:04
Message-ID: 1232446684.707940.17416.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 913970 by hschaa:

Delete 802.1x setting if wireless security is not WPA-EAP

CCMAIL: wstephenson@kde.org


 M  +18 -0     wirelesspreferences.cpp  


--- branches/work/knetworkmanager-4.1-openSUSE/libs/ui/wirelesspreferences.cpp \
#913969:913970 @@ -27,6 +27,9 @@
 #include <KDebug>
 #include <KTabWidget>
 
+#include <nm-setting-wireless-security.h>
+#include <nm-setting-8021x.h>
+
 #include "configxml.h"
 #include "secretstoragehelper.h"
 #include "802_11_wirelesswidget.h"
@@ -110,6 +113,21 @@
     // interaction between tray and service
     // location of service (in-tray, in plasma)
     //
+
+    // as all wireless-security settings are created even if not used we
+    // should discard the 802.1x here if the wireless security type is
+    // not WPA-EAP
+    if (m_contents->configXml()->config()->hasGroup(NM_SETTING_WIRELESS_SECURITY_SETTING_NAME)
 +        &&  m_contents->configXml()->config()->hasGroup(NM_SETTING_802_1X_SETTING_NAME))
 +    {
+        KConfigGroup cgSec(m_contents->configXml()->config(), \
NM_SETTING_WIRELESS_SECURITY_SETTING_NAME); +        if (cgSec.readEntry("keymgmt") \
!= Wireless80211SecurityWidget::KEY_MGMT_WPA_EAP) +        {
+            KConfigGroup cg8021x(m_contents->configXml()->config(), \
NM_SETTING_802_1X_SETTING_NAME); +            cg8021x.deleteGroup();
+        }
+    }
+
 }
 
 // vim: sw=4 sts=4 et tw=100


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic