summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-10-22 21:04:58 (UTC)
committer benmeyer <benmeyer>2002-10-22 21:04:58 (UTC)
commitc306ba7e1c73ec200b1621d224fc77f45e798e13 (patch) (unidiff)
tree1eb110c64b99c2e6ea2f8ab44c053f1e65f320f3
parent1e1b3e398d6b978a9c2bbd85d8f6b7aafbf72b2f (diff)
downloadopie-c306ba7e1c73ec200b1621d224fc77f45e798e13.zip
opie-c306ba7e1c73ec200b1621d224fc77f45e798e13.tar.gz
opie-c306ba7e1c73ec200b1621d224fc77f45e798e13.tar.bz2
Fix segfault
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/TODO6
-rw-r--r--noncore/net/networksetup/interface.cpp4
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wextensions.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wlanimp.cpp2
-rw-r--r--noncore/net/networksetup/wlan/wlanmodule.cpp10
-rw-r--r--noncore/settings/networksettings/TODO6
-rw-r--r--noncore/settings/networksettings/interface.cpp4
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp10
12 files changed, 26 insertions, 26 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO
index 7a71142..d61c510 100644
--- a/noncore/net/networksetup/TODO
+++ b/noncore/net/networksetup/TODO
@@ -1,11 +1,9 @@
1WLAN needs to be re-written to not use Config 1WLAN needs to be re-written to not use Config
2-remove WLAN Config item 2WHERE Is DHCP info stored???
3-sub class out the wlan info
4-check if an interface supports wireless extensions before config.
5 3
6PPP module needs to be written 4PPP module needs to be written
7 5
8Write a class that parses /proc and not ifconfig 6Write a class that parses /proc and not ifconfig
9 7
10Possible other modules: ipsec, bluetooth 8Possible other modules: ipsec, bluetooth, ipchains
11 9
diff --git a/noncore/net/networksetup/interface.cpp b/noncore/net/networksetup/interface.cpp
index a84b91f..929b3a1 100644
--- a/noncore/net/networksetup/interface.cpp
+++ b/noncore/net/networksetup/interface.cpp
@@ -6,7 +6,7 @@
6#include <qtextstream.h> 6#include <qtextstream.h>
7 7
8#define IFCONFIG "/sbin/ifconfig" 8#define IFCONFIG "/sbin/ifconfig"
9#define HDCP_INFO_DIR "/etc/dhcpc" 9#define DHCP_INFO_DIR "/etc/dhcpc"
10 10
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
@@ -171,7 +171,7 @@ bool Interface::refresh(){
171 leaseExpires = ""; 171 leaseExpires = "";
172 dhcp = false; 172 dhcp = false;
173 173
174 QString dhcpDirectory(HDCP_INFO_DIR); 174 QString dhcpDirectory(DHCP_INFO_DIR);
175 QDir d(dhcpDirectory); 175 QDir d(dhcpDirectory);
176 if(!d.exists(dhcpDirectory)) 176 if(!d.exists(dhcpDirectory))
177 dhcpDirectory = "/var/run"; 177 dhcpDirectory = "/var/run";
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 9d81ab1..c86acdc 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -78,6 +78,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
78 * Deconstructor. Save profiles. Delete loaded libraries. 78 * Deconstructor. Save profiles. Delete loaded libraries.
79 */ 79 */
80MainWindowImp::~MainWindowImp(){ 80MainWindowImp::~MainWindowImp(){
81 qDebug("start Saving mainwindow");
81 // Save profiles. 82 // Save profiles.
82 Config cfg("NetworkSetup"); 83 Config cfg("NetworkSetup");
83 cfg.setGroup("General"); 84 cfg.setGroup("General");
@@ -96,6 +97,7 @@ MainWindowImp::~MainWindowImp(){
96 delete it.key(); 97 delete it.key();
97 delete it.data(); 98 delete it.data();
98 } 99 }
100 qDebug("done Saving mainwindow");
99} 101}
100 102
101/** 103/**
diff --git a/noncore/net/networksetup/wlan/wextensions.cpp b/noncore/net/networksetup/wlan/wextensions.cpp
index ef4ba8f..e545bd1 100644
--- a/noncore/net/networksetup/wlan/wextensions.cpp
+++ b/noncore/net/networksetup/wlan/wextensions.cpp
@@ -157,7 +157,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
157 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); 157 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal );
158 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) 158 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
159 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); 159 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise );
160 qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); 160 //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
161 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; 161 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
162 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; 162 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
163 quality = ( quality*100 ) / 92; 163 quality = ( quality*100 ) / 92;
diff --git a/noncore/net/networksetup/wlan/wlanimp.cpp b/noncore/net/networksetup/wlan/wlanimp.cpp
index ea19207..94c7518 100644
--- a/noncore/net/networksetup/wlan/wlanimp.cpp
+++ b/noncore/net/networksetup/wlan/wlanimp.cpp
@@ -16,7 +16,7 @@
16#include <qcheckbox.h> 16#include <qcheckbox.h>
17#include <qregexp.h> 17#include <qregexp.h>
18 18
19WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ 19WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){
20 config = new Config("wireless"); 20 config = new Config("wireless");
21 readConfig(); 21 readConfig();
22} 22}
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp
index 73e753c..7507c54 100644
--- a/noncore/net/networksetup/wlan/wlanmodule.cpp
+++ b/noncore/net/networksetup/wlan/wlanmodule.cpp
@@ -10,7 +10,6 @@
10 * Constructor, find all of the possible interfaces 10 * Constructor, find all of the possible interfaces
11 */ 11 */
12WLANModule::WLANModule() : Module() { 12WLANModule::WLANModule() : Module() {
13 // get output from iwconfig
14} 13}
15 14
16/** 15/**
@@ -47,12 +46,9 @@ bool WLANModule::isOwner(Interface *i){
47 if(!we.doesHaveWirelessExtensions()) 46 if(!we.doesHaveWirelessExtensions())
48 return false; 47 return false;
49 48
50 //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){
51 i->setHardwareName("802.11b"); 49 i->setHardwareName("802.11b");
52 list.append(i); 50 list.append(i);
53 return true; 51 return true;
54 //}
55 //return false;
56} 52}
57 53
58/** 54/**
@@ -76,7 +72,7 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
76 if(!we.doesHaveWirelessExtensions()) 72 if(!we.doesHaveWirelessExtensions())
77 return NULL; 73 return NULL;
78 74
79 WlanInfo *info = new WlanInfo(0, "wireless info"); 75 WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose);
80 (*tabWidget) = info->tabWidget; 76 (*tabWidget) = info->tabWidget;
81 77
82 info->essidLabel->setText(we.essid()); 78 info->essidLabel->setText(we.essid());
@@ -92,6 +88,10 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
92 info->noiseProgressBar->setProgress(noise); 88 info->noiseProgressBar->setProgress(noise);
93 info->qualityProgressBar->setProgress(quality); 89 info->qualityProgressBar->setProgress(quality);
94 info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); 90 info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate()));
91 //WlanInfo info (0, "wireless info", true);
92 //info.show();
93 //return NULL;
94
95 return info; 95 return info;
96} 96}
97 97
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO
index 7a71142..d61c510 100644
--- a/noncore/settings/networksettings/TODO
+++ b/noncore/settings/networksettings/TODO
@@ -1,11 +1,9 @@
1WLAN needs to be re-written to not use Config 1WLAN needs to be re-written to not use Config
2-remove WLAN Config item 2WHERE Is DHCP info stored???
3-sub class out the wlan info
4-check if an interface supports wireless extensions before config.
5 3
6PPP module needs to be written 4PPP module needs to be written
7 5
8Write a class that parses /proc and not ifconfig 6Write a class that parses /proc and not ifconfig
9 7
10Possible other modules: ipsec, bluetooth 8Possible other modules: ipsec, bluetooth, ipchains
11 9
diff --git a/noncore/settings/networksettings/interface.cpp b/noncore/settings/networksettings/interface.cpp
index a84b91f..929b3a1 100644
--- a/noncore/settings/networksettings/interface.cpp
+++ b/noncore/settings/networksettings/interface.cpp
@@ -6,7 +6,7 @@
6#include <qtextstream.h> 6#include <qtextstream.h>
7 7
8#define IFCONFIG "/sbin/ifconfig" 8#define IFCONFIG "/sbin/ifconfig"
9#define HDCP_INFO_DIR "/etc/dhcpc" 9#define DHCP_INFO_DIR "/etc/dhcpc"
10 10
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
@@ -171,7 +171,7 @@ bool Interface::refresh(){
171 leaseExpires = ""; 171 leaseExpires = "";
172 dhcp = false; 172 dhcp = false;
173 173
174 QString dhcpDirectory(HDCP_INFO_DIR); 174 QString dhcpDirectory(DHCP_INFO_DIR);
175 QDir d(dhcpDirectory); 175 QDir d(dhcpDirectory);
176 if(!d.exists(dhcpDirectory)) 176 if(!d.exists(dhcpDirectory))
177 dhcpDirectory = "/var/run"; 177 dhcpDirectory = "/var/run";
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 9d81ab1..c86acdc 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -78,6 +78,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par
78 * Deconstructor. Save profiles. Delete loaded libraries. 78 * Deconstructor. Save profiles. Delete loaded libraries.
79 */ 79 */
80MainWindowImp::~MainWindowImp(){ 80MainWindowImp::~MainWindowImp(){
81 qDebug("start Saving mainwindow");
81 // Save profiles. 82 // Save profiles.
82 Config cfg("NetworkSetup"); 83 Config cfg("NetworkSetup");
83 cfg.setGroup("General"); 84 cfg.setGroup("General");
@@ -96,6 +97,7 @@ MainWindowImp::~MainWindowImp(){
96 delete it.key(); 97 delete it.key();
97 delete it.data(); 98 delete it.data();
98 } 99 }
100 qDebug("done Saving mainwindow");
99} 101}
100 102
101/** 103/**
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp
index ef4ba8f..e545bd1 100644
--- a/noncore/settings/networksettings/wlan/wextensions.cpp
+++ b/noncore/settings/networksettings/wlan/wextensions.cpp
@@ -157,7 +157,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
157 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); 157 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal );
158 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) 158 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
159 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); 159 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise );
160 qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); 160 //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1());
161 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; 161 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
162 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; 162 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
163 quality = ( quality*100 ) / 92; 163 quality = ( quality*100 ) / 92;
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index ea19207..94c7518 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -16,7 +16,7 @@
16#include <qcheckbox.h> 16#include <qcheckbox.h>
17#include <qregexp.h> 17#include <qregexp.h>
18 18
19WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name){ 19WLANImp::WLANImp( QWidget* parent, const char* name):WLAN(parent, name, Qt::WDestructiveClose){
20 config = new Config("wireless"); 20 config = new Config("wireless");
21 readConfig(); 21 readConfig();
22} 22}
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 73e753c..7507c54 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -10,7 +10,6 @@
10 * Constructor, find all of the possible interfaces 10 * Constructor, find all of the possible interfaces
11 */ 11 */
12WLANModule::WLANModule() : Module() { 12WLANModule::WLANModule() : Module() {
13 // get output from iwconfig
14} 13}
15 14
16/** 15/**
@@ -47,12 +46,9 @@ bool WLANModule::isOwner(Interface *i){
47 if(!we.doesHaveWirelessExtensions()) 46 if(!we.doesHaveWirelessExtensions())
48 return false; 47 return false;
49 48
50 //if(i->getInterfaceName() == "eth0" || i->getInterfaceName() == "wlan0"){
51 i->setHardwareName("802.11b"); 49 i->setHardwareName("802.11b");
52 list.append(i); 50 list.append(i);
53 return true; 51 return true;
54 //}
55 //return false;
56} 52}
57 53
58/** 54/**
@@ -76,7 +72,7 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
76 if(!we.doesHaveWirelessExtensions()) 72 if(!we.doesHaveWirelessExtensions())
77 return NULL; 73 return NULL;
78 74
79 WlanInfo *info = new WlanInfo(0, "wireless info"); 75 WlanInfo *info = new WlanInfo(0, "wireless info", Qt::WDestructiveClose);
80 (*tabWidget) = info->tabWidget; 76 (*tabWidget) = info->tabWidget;
81 77
82 info->essidLabel->setText(we.essid()); 78 info->essidLabel->setText(we.essid());
@@ -92,6 +88,10 @@ QWidget *WLANModule::information(Interface *i, QTabWidget **tabWidget){
92 info->noiseProgressBar->setProgress(noise); 88 info->noiseProgressBar->setProgress(noise);
93 info->qualityProgressBar->setProgress(quality); 89 info->qualityProgressBar->setProgress(quality);
94 info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate())); 90 info->rateLabel->setText(QString("%1 Mb/s").arg(we.rate()));
91 //WlanInfo info (0, "wireless info", true);
92 //info.show();
93 //return NULL;
94
95 return info; 95 return info;
96} 96}
97 97