[PC-BSD Commits] r9791 - pcbsd/current/src-qt4/libpcbsd

svn at pcbsd.org svn at pcbsd.org
Mon Mar 28 11:27:28 PDT 2011


Author: kris
Date: 2011-03-28 11:27:28 -0700 (Mon, 28 Mar 2011)
New Revision: 9791

Modified:
   pcbsd/current/src-qt4/libpcbsd/netif.cpp
Log:

Fixed detection of some WEP networks



Modified: pcbsd/current/src-qt4/libpcbsd/netif.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/netif.cpp	2011-03-28 17:44:12 UTC (rev 9790)
+++ pcbsd/current/src-qt4/libpcbsd/netif.cpp	2011-03-28 18:27:28 UTC (rev 9791)
@@ -37,6 +37,7 @@
 #include <stdlib.h>
 
 #include <qregexp.h>
+#include <QDebug>
 #include <qstring.h>
 //#include <QMessageBox> //for debugging purposes
 
@@ -350,17 +351,16 @@
   QString ifconfOut = Utils::runShellCommandSearch(command,smSSID);
   QStringList parsed = NetworkInterface::parseWifiScanLine(ifconfOut,false);
   QString caps = parsed[6];
-  bool noSecure=true;
-  if(!parsed[7].isEmpty()){noSecure=false;}
   QStringList secure = parsed[7].split(" "); //put each security type in a different list element
     
   //Examine the CAPS and Security data to determine the wifi encryption type
   bool isDisabled = !caps.contains("P") && caps.contains("ES"); //CAPS = "ES" only -> no wifi encryption
-  bool isWEP = caps.contains("EP") && noSecure; //CAPS = "EP" or "EPS" only (could also be RADIUS security type)
+  bool isWEP = caps.contains("EP"); //CAPS = "EP" or "EPS" only (could also be RADIUS security type)
   bool isWPA = secure.contains("WPA"); //both WPA personal and enterprise
   bool isWPA2 = secure.contains("RSN"); //both WPA2 personal and enterprise
   
-  //QMessageBox::warning(0,"Testing wifi Security","SSID: "+smSSID+"\ncaps: "+caps); //debugging
+  qDebug() << "SSID: "+smSSID+"\ncaps: "+caps;
+
   //Output the security type
   QString securityType;
   if(isDisabled){ 
@@ -374,8 +374,6 @@
   }else{ 
     securityType = "ERROR";
   }
-  
   return securityType;
-  
 }
 



More information about the Commits mailing list