summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-12-12 15:50:46 (UTC)
committer benmeyer <benmeyer>2002-12-12 15:50:46 (UTC)
commit2ebde078dcdc50434acb10f2fa245b0d3dd483bd (patch) (unidiff)
treef58b4c658e34aaa867bbe22e0ad6b481cbdda0dd
parent6c34d8a9165d46eb3d7d28c859e592d0aecbc92f (diff)
downloadopie-2ebde078dcdc50434acb10f2fa245b0d3dd483bd.zip
opie-2ebde078dcdc50434acb10f2fa245b0d3dd483bd.tar.gz
opie-2ebde078dcdc50434acb10f2fa245b0d3dd483bd.tar.bz2
Encryption issues fixed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp28
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp28
2 files changed, 26 insertions, 30 deletions
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index 84e0bae..cc18fba 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -98,13 +98,13 @@ void WLANImp::parseSettingFile(){
98 channelLabel->setEnabled(true); 98 channelLabel->setEnabled(true);
99 } 99 }
100 } 100 }
101 if(line.contains("KEY0=")) 101 if(line.contains("#KEY0="))
102 keyLineEdit0->setText(line.mid(5, line.length())); 102 keyLineEdit0->setText(line.mid(5, line.length()));
103 if(line.contains("KEY1=")) 103 if(line.contains("#KEY1="))
104 keyLineEdit1->setText(line.mid(5, line.length())); 104 keyLineEdit1->setText(line.mid(5, line.length()));
105 if(line.contains("KEY2=")) 105 if(line.contains("#KEY2="))
106 keyLineEdit2->setText(line.mid(5, line.length())); 106 keyLineEdit2->setText(line.mid(5, line.length()));
107 if(line.contains("KEY3=")) 107 if(line.contains("#KEY3="))
108 keyLineEdit3->setText(line.mid(5, line.length())); 108 keyLineEdit3->setText(line.mid(5, line.length()));
109 109
110 if(line.contains("KEY=")){ 110 if(line.contains("KEY=")){
@@ -165,7 +165,6 @@ void WLANImp::changeAndSaveSettingFile(){
165 if(!essAny->isChecked() == true){ 165 if(!essAny->isChecked() == true){
166 stream << "\tESSID=any\n"; 166 stream << "\tESSID=any\n";
167 stream << "\tMODE=Managed\n"; 167 stream << "\tMODE=Managed\n";
168 stream << "\tCHANNEL=6\n";
169 } 168 }
170 else{ 169 else{
171 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; 170 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
@@ -173,10 +172,10 @@ void WLANImp::changeAndSaveSettingFile(){
173 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 172 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
174 } 173 }
175 174
176 stream << "\tKEY0=" << keyLineEdit0->text() << "\n"; 175 stream << "\t#KEY0=" << keyLineEdit0->text() << "\n";
177 stream << "\tKEY1=" << keyLineEdit1->text() << "\n"; 176 stream << "\t#KEY1=" << keyLineEdit1->text() << "\n";
178 stream << "\tKEY2=" << keyLineEdit2->text() << "\n"; 177 stream << "\t#KEY2=" << keyLineEdit2->text() << "\n";
179 stream << "\tKEY3=" << keyLineEdit3->text() << "\n"; 178 stream << "\t#KEY3=" << keyLineEdit3->text() << "\n";
180 179
181 if(wepEnabled->isChecked()){ 180 if(wepEnabled->isChecked()){
182 stream << "\tKEY=\""; 181 stream << "\tKEY=\"";
@@ -208,14 +207,13 @@ void WLANImp::changeAndSaveSettingFile(){
208 */ 207 */
209void WLANImp::accept(){ 208void WLANImp::accept(){
210 if(wepEnabled->isChecked()){ 209 if(wepEnabled->isChecked()){
211 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) 210 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){
212 { 211 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
213 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); 212 return;
214 return; 213 }
215 }
216 } 214 }
217 215
218 if(essSpecificLineEdit->text().isEmpty()){ 216 if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){
219 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); 217 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
220 return; 218 return;
221 } 219 }
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index 84e0bae..cc18fba 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -98,13 +98,13 @@ void WLANImp::parseSettingFile(){
98 channelLabel->setEnabled(true); 98 channelLabel->setEnabled(true);
99 } 99 }
100 } 100 }
101 if(line.contains("KEY0=")) 101 if(line.contains("#KEY0="))
102 keyLineEdit0->setText(line.mid(5, line.length())); 102 keyLineEdit0->setText(line.mid(5, line.length()));
103 if(line.contains("KEY1=")) 103 if(line.contains("#KEY1="))
104 keyLineEdit1->setText(line.mid(5, line.length())); 104 keyLineEdit1->setText(line.mid(5, line.length()));
105 if(line.contains("KEY2=")) 105 if(line.contains("#KEY2="))
106 keyLineEdit2->setText(line.mid(5, line.length())); 106 keyLineEdit2->setText(line.mid(5, line.length()));
107 if(line.contains("KEY3=")) 107 if(line.contains("#KEY3="))
108 keyLineEdit3->setText(line.mid(5, line.length())); 108 keyLineEdit3->setText(line.mid(5, line.length()));
109 109
110 if(line.contains("KEY=")){ 110 if(line.contains("KEY=")){
@@ -165,7 +165,6 @@ void WLANImp::changeAndSaveSettingFile(){
165 if(!essAny->isChecked() == true){ 165 if(!essAny->isChecked() == true){
166 stream << "\tESSID=any\n"; 166 stream << "\tESSID=any\n";
167 stream << "\tMODE=Managed\n"; 167 stream << "\tMODE=Managed\n";
168 stream << "\tCHANNEL=6\n";
169 } 168 }
170 else{ 169 else{
171 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n'; 170 stream << "\tESSID=" << essSpecificLineEdit->text() << '\n';
@@ -173,10 +172,10 @@ void WLANImp::changeAndSaveSettingFile(){
173 stream << "\tCHANNEL=" << networkChannel->value() << "\n"; 172 stream << "\tCHANNEL=" << networkChannel->value() << "\n";
174 } 173 }
175 174
176 stream << "\tKEY0=" << keyLineEdit0->text() << "\n"; 175 stream << "\t#KEY0=" << keyLineEdit0->text() << "\n";
177 stream << "\tKEY1=" << keyLineEdit1->text() << "\n"; 176 stream << "\t#KEY1=" << keyLineEdit1->text() << "\n";
178 stream << "\tKEY2=" << keyLineEdit2->text() << "\n"; 177 stream << "\t#KEY2=" << keyLineEdit2->text() << "\n";
179 stream << "\tKEY3=" << keyLineEdit3->text() << "\n"; 178 stream << "\t#KEY3=" << keyLineEdit3->text() << "\n";
180 179
181 if(wepEnabled->isChecked()){ 180 if(wepEnabled->isChecked()){
182 stream << "\tKEY=\""; 181 stream << "\tKEY=\"";
@@ -208,14 +207,13 @@ void WLANImp::changeAndSaveSettingFile(){
208 */ 207 */
209void WLANImp::accept(){ 208void WLANImp::accept(){
210 if(wepEnabled->isChecked()){ 209 if(wepEnabled->isChecked()){
211 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ) 210 if(keyLineEdit0->text().isEmpty() && keyLineEdit1->text().isEmpty() && keyLineEdit2->text().isEmpty() && keyLineEdit3->text().isEmpty() ){
212 { 211 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok);
213 QMessageBox::information(this, "Error", "Please enter a key for WEP.", QMessageBox::Ok); 212 return;
214 return; 213 }
215 }
216 } 214 }
217 215
218 if(essSpecificLineEdit->text().isEmpty()){ 216 if(essAny->isChecked() && essSpecificLineEdit->text().isEmpty()){
219 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok); 217 QMessageBox::information(this, "Error", "Please enter a ESS-ID.", QMessageBox::Ok);
220 return; 218 return;
221 } 219 }