[PC-BSD Commits] r9782 - pcbsd/current/src-qt4/libpcbsd
svn at pcbsd.org
svn at pcbsd.org
Fri Mar 25 07:46:20 PDT 2011
Author: kenmoore
Date: 2011-03-25 07:46:20 -0700 (Fri, 25 Mar 2011)
New Revision: 9782
Modified:
pcbsd/current/src-qt4/libpcbsd/netif.cpp
Log:
Fix a bug for multiple wifi points with the same SSID
Modified: pcbsd/current/src-qt4/libpcbsd/netif.cpp
===================================================================
--- pcbsd/current/src-qt4/libpcbsd/netif.cpp 2011-03-25 14:33:48 UTC (rev 9781)
+++ pcbsd/current/src-qt4/libpcbsd/netif.cpp 2011-03-25 14:46:20 UTC (rev 9782)
@@ -38,7 +38,7 @@
#include <qregexp.h>
#include <qstring.h>
-#include <QMessageBox>
+//#include <QMessageBox> //for debugging purposes
#include "pcbsd-netif.h"
#include "pcbsd-utils.h"
@@ -337,14 +337,15 @@
}
QString NetworkInterface::getWifiSecurity( QString SSID, QString deviceName ){
- //Make sure the SSID is less than 16 long (non verbose will be used to search)
+ //Make sure the SSID is short enough (non verbose will be used to search)
QString smSSID;
- if(SSID.size() > 16){
+ if(SSID.size() > 10){
smSSID = SSID.left(10);
}else{
smSSID = SSID;
}
//Scan the wifi to determine the security type
+ //If there are multiple wifi's with the same SSID, it will use the first one only
QString command = "ifconfig " + deviceName + " list scan";
QString ifconfOut = Utils::runShellCommandSearch(command,smSSID);
QStringList parsed = NetworkInterface::parseWifiScanLine(ifconfOut,false);
@@ -359,7 +360,7 @@
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","caps: "+caps+"\nifconfOut: "+ifconfOut);
+ //QMessageBox::warning(0,"Testing wifi Security","SSID: "+smSSID+"\ncaps: "+caps); //debugging
//Output the security type
QString securityType;
if(isDisabled){
More information about the Commits
mailing list