Changeset 2669
- Timestamp:
- 09/02/08 07:50:25 (3 months ago)
- Location:
- pcbsd/trunk/wificonfig
- Files:
-
- 3 modified
-
wificonfig.pro (modified) (1 diff)
-
wificonfigwidgetbase.cpp (modified) (2 diffs)
-
wifiselectiondialog.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/trunk/wificonfig/wificonfig.pro
r2167 r2669 33 33 TARGET = wificonfig 34 34 35 QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib 36 35 37 DESTDIR = /PCBSD/networkmanager/bin/ 36 38 -
pcbsd/trunk/wificonfig/wificonfigwidgetbase.cpp
r2446 r2669 94 94 } 95 95 96 97 // If we are using WEP security, write the ifconfig line 98 QString confLine = "ifconfig_" + DeviceName + "=\""; 99 confLine += ifConfigLine; 100 if ( checkBSSID->isChecked() ) { 101 confLine += " bssid " + lineBSSID->text() + " wepmode on"; 102 } else { 103 confLine += " ssid \"" + lineSSID->text() + "\" wepmode on"; 104 } 105 106 if ( WEPHex ) { 107 confLine += " wepkey 0x" + WEPKey + " weptxkey " + tmp.setNum(WEPIndex); 108 } else { 109 confLine += " wepkey \"" + WEPKey + "\" weptxkey " + tmp.setNum(WEPIndex); 110 } 111 112 confLine += "\""; 113 saveValue( "/etc/rc.conf", "ifconfig_" + DeviceName, confLine, -1); 96 // Indicate that we are using WPA supplicant 97 saveValue( "/etc/rc.conf", "ifconfig_" + DeviceName, "ifconfig_" + DeviceName + "=\"WPA " + ifConfigLine + "\"", -1); 98 99 // Now create the wpa_supplicant file based on saved configuration 100 QFile fileout( "/etc/wpa_supplicant.conf" ); 101 if ( fileout.open( IO_WriteOnly ) ) { 102 QTextStream streamout( &fileout ); 103 if ( checkBSSID->isChecked() ) { 104 streamout << "network={\n bssid=\"" + lineBSSID->text() + "\"\n"; 105 } else { 106 streamout << "network={\n ssid=\"" + lineSSID->text() + "\"\n"; 107 } 108 109 streamout << " scan_ssid=1\n"; 110 streamout << " key_mgmt=NONE\n"; 111 streamout << " wep_tx_keyidx=" + tmp.setNum(WEPIndex -1) + "\n"; 112 streamout << " wep_key" + tmp.setNum(WEPIndex -1) + "=" + WEPKey + "\n"; 113 streamout << "}\n"; 114 fileout.close(); 115 } 116 114 117 115 118 } else if (radioSecurityWPAPersonal->isChecked() ) { … … 1025 1028 if ( ok ) { 1026 1029 WEPIndex = tmp2.toInt(&ok); 1030 WEPIndex++; 1027 1031 } 1028 1032 radioSecurityWEP->setChecked(TRUE); -
pcbsd/trunk/wificonfig/wifiselectiondialog.cpp
r2657 r2669 60 60 tmp = line; 61 61 tmp = tmp.simplified(); 62 tmp.truncate(tmp.find(" ")); 62 tmp.truncate(tmp.find(":")); 63 tmp.truncate(tmp.findRev(" ")); 63 64 ssid = tmp; 64 65 … … 66 67 tmp = line; 67 68 tmp = tmp.simplified(); 68 tmp = tmp.section(" ", 4, 4); 69 70 // First remove the SSID which may have spaces in it 71 tmp.remove(0, tmp.find(":")); 72 73 // Now find the strength section 74 tmp = tmp.section(" ", 3, 3); 69 75 tmp.truncate(tmp.find(":")); 70 76 strength = tmp; … … 166 172 167 173 selectedSSID = listWifi->text(sel); 168 selectedSSID.truncate( selectedSSID.find(" "));174 selectedSSID.truncate( selectedSSID.find("(") - 1 ); 169 175 170 176 // Emit the new network SSID the user selected
