summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings
Unidiff
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interface.cpp20
-rw-r--r--noncore/settings/networksettings/interfaces/interfaces.cpp42
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp14
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp38
-rw-r--r--noncore/settings/networksettings/ppp/accounts.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/authwidget.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp10
-rw-r--r--noncore/settings/networksettings/ppp/devices.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceinformationppp.cpp2
-rw-r--r--noncore/settings/networksettings/ppp/interfaceppp.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp20
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp48
-rw-r--r--noncore/settings/networksettings/ppp/pppconfig.cpp12
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp92
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp20
-rw-r--r--noncore/settings/networksettings/wlan/infoimp.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp12
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp6
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp24
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp54
21 files changed, 222 insertions, 222 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp
index b00b899..d2b106a 100644
--- a/noncore/settings/networksettings/interfaces/interface.cpp
+++ b/noncore/settings/networksettings/interfaces/interface.cpp
@@ -137,13 +137,13 @@ bool Interface::refresh(){
137 QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); 137 QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name());
138 int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); 138 int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1());
139 if(ret != 0){ 139 if(ret != 0){
140 qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); 140 odebug << QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1() << oendl;
141 return false; 141 return false;
142 } 142 }
143 143
144 QFile file(fileName); 144 QFile file(fileName);
145 if (!file.open(IO_ReadOnly)){ 145 if (!file.open(IO_ReadOnly)){
146 qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); 146 odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl;
147 return false; 147 return false;
148 } 148 }
149 149
@@ -201,7 +201,7 @@ bool Interface::refresh(){
201 201
202 file.setName(dhcpFile); 202 file.setName(dhcpFile);
203 if (!file.open(IO_ReadOnly)){ 203 if (!file.open(IO_ReadOnly)){
204 qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); 204 odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl;
205 return false; 205 return false;
206 } 206 }
207 207
@@ -220,14 +220,14 @@ bool Interface::refresh(){
220 renewalTime = line.mid(12, line.length()).toInt(); 220 renewalTime = line.mid(12, line.length()).toInt();
221 } 221 }
222 file.close(); 222 file.close();
223 //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); 223 //odebug << QString("Interface: leaseTime: %1").arg(leaseTime).latin1() << oendl;
224 //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); 224 //odebug << QString("Interface: renewalTime: %1").arg(renewalTime).latin1() << oendl;
225 225
226 // Get the pid of the deamond 226 // Get the pid of the deamond
227 dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); 227 dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name()));
228 file.setName(dhcpFile); 228 file.setName(dhcpFile);
229 if (!file.open(IO_ReadOnly)){ 229 if (!file.open(IO_ReadOnly)){
230 qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); 230 odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl;
231 return false; 231 return false;
232 } 232 }
233 233
@@ -240,7 +240,7 @@ bool Interface::refresh(){
240 file.close(); 240 file.close();
241 241
242 if( pid == -1){ 242 if( pid == -1){
243 qDebug("Interface: Could not get pid of dhcpc deamon."); 243 odebug << "Interface: Could not get pid of dhcpc deamon." << oendl;
244 return false; 244 return false;
245 } 245 }
246 246
@@ -249,7 +249,7 @@ bool Interface::refresh(){
249 file.setName(fileName); 249 file.setName(fileName);
250 stream.setDevice( &file ); 250 stream.setDevice( &file );
251 if (!file.open(IO_ReadOnly)){ 251 if (!file.open(IO_ReadOnly)){
252 qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); 252 odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl;
253 return false; 253 return false;
254 } 254 }
255 while ( !stream.eof() ) { 255 while ( !stream.eof() ) {
@@ -278,12 +278,12 @@ bool Interface::refresh(){
278 f.close(); 278 f.close();
279 } 279 }
280 else{ 280 else{
281 qDebug("Interface: Can't open /proc/uptime to retrive uptime."); 281 odebug << "Interface: Can't open /proc/uptime to retrive uptime." << oendl;
282 return false; 282 return false;
283 } 283 }
284 284
285 datetime = datetime.addSecs(time); 285 datetime = datetime.addSecs(time);
286 //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); 286 //odebug << QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1() << oendl;
287 287
288 // Calculate the start and renew times 288 // Calculate the start and renew times
289 leaseObtained= datetime.toString(); 289 leaseObtained= datetime.toString();
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp
index 6b161ae..e283926 100644
--- a/noncore/settings/networksettings/interfaces/interfaces.cpp
+++ b/noncore/settings/networksettings/interfaces/interfaces.cpp
@@ -24,7 +24,7 @@ Interfaces::Interfaces(QString useInterfacesFile){
24 interfacesFile = useInterfacesFile; 24 interfacesFile = useInterfacesFile;
25 QFile file(interfacesFile); 25 QFile file(interfacesFile);
26 if (!file.open(IO_ReadOnly)){ 26 if (!file.open(IO_ReadOnly)){
27 qDebug("Interfaces: Can't open file: %s for reading.", interfacesFile.latin1() ); 27 odebug << "Interfaces: Can't open file: " << interfacesFile.latin1() << " for reading." << oendl;
28 currentIface = interfaces.end(); 28 currentIface = interfaces.end();
29 currentMapping = interfaces.end(); 29 currentMapping = interfaces.end();
30 return; 30 return;
@@ -76,7 +76,7 @@ bool Interfaces::isAuto(const QString &interface) const {
76 QStringList autoLines = interfaces.grep(QRegExp(AUTO)); 76 QStringList autoLines = interfaces.grep(QRegExp(AUTO));
77 QStringList awi = autoLines.grep(QRegExp(interface)); 77 QStringList awi = autoLines.grep(QRegExp(interface));
78 if(awi.count() > 1) 78 if(awi.count() > 1)
79 qDebug(QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1()); 79 odebug << QString("Interfaces: Found more then auto group with interface: %1.").arg(interface).latin1() << oendl;
80 return awi.count() > 0; 80 return awi.count() > 0;
81} 81}
82 82
@@ -152,7 +152,7 @@ bool Interfaces::isInterfaceSet() const {
152 * @return true if successful. 152 * @return true if successful.
153 */ 153 */
154bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){ 154bool Interfaces::addInterface(const QString &interface, const QString &family, const QString &method){
155 qDebug("Interfaces::addInterface(%s)",interface.latin1()); 155 odebug << "Interfaces::addInterface(" << interface.latin1() << ")" << oendl;
156 if(0 == acceptedFamily.contains(family)) 156 if(0 == acceptedFamily.contains(family))
157 return false; 157 return false;
158 QString newInterface = interface.simplifyWhiteSpace(); 158 QString newInterface = interface.simplifyWhiteSpace();
@@ -168,7 +168,7 @@ bool Interfaces::addInterface(const QString &interface, const QString &family, c
168 * @return bool true if successful 168 * @return bool true if successful
169 */ 169 */
170bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){ 170bool Interfaces::copyInterface(const QString &interface, const QString &newInterface){
171 qDebug("copy interface %s to %s", interface.latin1(), newInterface.latin1()); 171 odebug << "copy interface " << interface.latin1() << " to " << newInterface.latin1() << "" << oendl;
172 if(!setInterface(interface)) 172 if(!setInterface(interface))
173 return false; 173 return false;
174 174
@@ -275,14 +275,14 @@ QString Interfaces::getInterfaceMethod(bool &error){
275 * @return bool true if successful. 275 * @return bool true if successful.
276 */ 276 */
277bool Interfaces::setInterfaceName(const QString &newName){ 277bool Interfaces::setInterfaceName(const QString &newName){
278 qDebug("setInterfaceName %s", newName.latin1()); 278 odebug << "setInterfaceName " << newName.latin1() << "" << oendl;
279 if(currentIface == interfaces.end()) 279 if(currentIface == interfaces.end())
280 return false; 280 return false;
281 QString name = newName.simplifyWhiteSpace(); 281 QString name = newName.simplifyWhiteSpace();
282 name = name.replace(QRegExp(" "), ""); 282 name = name.replace(QRegExp(" "), "");
283 bool returnValue = false; 283 bool returnValue = false;
284 QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue)); 284 QString tmp = QString("iface %1 %2 %3").arg(name).arg(getInterfaceFamily(returnValue)).arg(getInterfaceMethod(returnValue));
285 qDebug("setting %s",tmp.latin1()); 285 odebug << "setting " << tmp.latin1() << "" << oendl;
286 286
287 (*currentIface) = tmp; 287 (*currentIface) = tmp;
288 return !returnValue; 288 return !returnValue;
@@ -345,7 +345,7 @@ bool Interfaces::setInterfaceOption(const QString &option, const QString &value)
345 if( value.stripWhiteSpace().isEmpty() ) 345 if( value.stripWhiteSpace().isEmpty() )
346 return removeInterfaceOption( option ); 346 return removeInterfaceOption( option );
347 347
348 qDebug("iface >%s< option >%s< value >%s<", (*currentIface).latin1(), option.latin1(),value.latin1()); 348 odebug << "iface >" << (*currentIface).latin1() << "< option >" << option.latin1() << "< value >" << value.latin1() << "<" << oendl;
349 return setOption(currentIface, option, value); 349 return setOption(currentIface, option, value);
350} 350}
351 351
@@ -486,7 +486,7 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString
486 } 486 }
487 if(valid){ 487 if(valid){
488 if(found == true){ 488 if(found == true){
489 qDebug(QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1()); 489 odebug << QString("Interfaces: Found multiple stanza's for search: %1 %2").arg(stanza).arg(option).latin1() << oendl;
490 } 490 }
491 found = true; 491 found = true;
492 iterator = it; 492 iterator = it;
@@ -505,12 +505,12 @@ bool Interfaces::setStanza(const QString &stanza, const QString &option, QString
505bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){ 505bool Interfaces::setOption(const QStringList::Iterator &start, const QString &option, const QString &value){
506 if(start == interfaces.end()) 506 if(start == interfaces.end())
507 return false; 507 return false;
508 qDebug("setting option"); 508 odebug << "setting option" << oendl;
509 bool found = false; 509 bool found = false;
510 bool replaced = false; 510 bool replaced = false;
511 QStringList::Iterator insertAt = NULL; 511 QStringList::Iterator insertAt = NULL;
512 for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { 512 for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) {
513 qDebug(" Interfaces::setOption got line >%s<",(*it).latin1()); 513 odebug << " Interfaces::setOption got line >" << (*it).latin1() << "<" << oendl;
514 // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line 514 // FIXME: was not completly stupid just wrong sice all options got inserted bevore the iface line
515 // but since it works with an empty interfaces file I (tille) will not do anything more 515 // but since it works with an empty interfaces file I (tille) will not do anything more
516 if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){ 516 if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) ){
@@ -518,10 +518,10 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op
518// && it != start){ 518// && it != start){
519// if(!found && value != ""){ 519// if(!found && value != ""){
520// // Got to the end of the stanza without finding it, so append it. 520// // Got to the end of the stanza without finding it, so append it.
521// qDebug(" Got to the end of the stanza without finding it, so append it."); 521// odebug << " Got to the end of the stanza without finding it, so append it." << oendl;
522// interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value)); 522// interfaces.insert(--it, QString("\t%1 %2").arg(option).arg(value));
523// } 523// }
524 qDebug("found 1"); 524 odebug << "found 1" << oendl;
525// interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value)); 525// interfaces.insert(++it, QString("\t%1 %2").arg(option).arg(value));
526 found = true; 526 found = true;
527 insertAt = it; 527 insertAt = it;
@@ -529,23 +529,23 @@ bool Interfaces::setOption(const QStringList::Iterator &start, const QString &op
529 } 529 }
530 if((*it).contains(option) && it != start && (*it).at(0) != '#'){ 530 if((*it).contains(option) && it != start && (*it).at(0) != '#'){
531 // Found it in stanza so replace it. 531 // Found it in stanza so replace it.
532 qDebug("found 2"); 532 odebug << "found 2" << oendl;
533 if(found) 533 if(found)
534 qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); 534 odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl;
535 found = true; 535 found = true;
536 replaced = true; 536 replaced = true;
537 (*it) = QString("\t%1 %2").arg(option).arg(value); 537 (*it) = QString("\t%1 %2").arg(option).arg(value);
538 } 538 }
539 } 539 }
540 if(!found){ 540 if(!found){
541 qDebug("! found insert anyway"); 541 odebug << "! found insert anyway" << oendl;
542 QStringList::Iterator p = start; 542 QStringList::Iterator p = start;
543 interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); 543 interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value));
544 found = true; 544 found = true;
545 } 545 }
546 546
547 if(found && !replaced){ 547 if(found && !replaced){
548 qDebug("found iface but not the option so insert it here..."); 548 odebug << "found iface but not the option so insert it here..." << oendl;
549 interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value)); 549 interfaces.insert(++insertAt, QString("\t%1 %2").arg(option).arg(value));
550 } 550 }
551 return found; 551 return found;
@@ -582,7 +582,7 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString
582 if((*it).contains(option) && it != start && (*it).at(0) != '#'){ 582 if((*it).contains(option) && it != start && (*it).at(0) != '#'){
583 // Found it in stanza so replace it. 583 // Found it in stanza so replace it.
584 if(found) 584 if(found)
585 qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); 585 odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl;
586 found = true; 586 found = true;
587 it = interfaces.remove( it ); // we really want to remove the line 587 it = interfaces.remove( it ); // we really want to remove the line
588 --it; // we do ++it later in the head of the for loop 588 --it; // we do ++it later in the head of the for loop
@@ -610,7 +610,7 @@ bool Interfaces::removeOption(const QStringList::Iterator &start, const QString
610 if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ 610 if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){
611 // Found it in stanza so replace it. 611 // Found it in stanza so replace it.
612 if(found) 612 if(found)
613 qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); 613 odebug << QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1() << oendl;
614 found = true; 614 found = true;
615 it = interfaces.remove( it ); // we really want to remove the line 615 it = interfaces.remove( it ); // we really want to remove the line
616 --it; // we do ++it later in the head of the for loop 616 --it; // we do ++it later in the head of the for loop
@@ -663,7 +663,7 @@ QString Interfaces::getOption(const QStringList::Iterator &start, const QString
663 } 663 }
664 if((*it).contains(option) && (*it).at(0) != '#'){ 664 if((*it).contains(option) && (*it).at(0) != '#'){
665 if(found) 665 if(found)
666 qDebug(QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); 666 odebug << QString("Interfaces: getOption found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1() << oendl;
667 found = true; 667 found = true;
668 QString line = (*it).simplifyWhiteSpace(); 668 QString line = (*it).simplifyWhiteSpace();
669 int space = line.find(" ", option.length()); 669 int space = line.find(" ", option.length());
@@ -687,7 +687,7 @@ bool Interfaces::write(){
687 QFile file(interfacesFile); 687 QFile file(interfacesFile);
688 688
689 if (!file.open(IO_ReadWrite)){ 689 if (!file.open(IO_ReadWrite)){
690 qDebug(QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1()); 690 odebug << QString("Interfaces: Can't open file: %1 for writing.").arg(interfacesFile).latin1() << oendl;
691 return false; 691 return false;
692 } 692 }
693 QTextStream stream( &file ); 693 QTextStream stream( &file );
@@ -700,7 +700,7 @@ bool Interfaces::write(){
700 else 700 else
701 whiteSpaceCount = 0; 701 whiteSpaceCount = 0;
702 if(whiteSpaceCount < 2){ 702 if(whiteSpaceCount < 2){
703 qDebug((*it).latin1()); 703 odebug << (*it).latin1() << oendl;
704 stream << (*it) << '\n'; 704 stream << (*it) << '\n';
705 } 705 }
706 } 706 }
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 7c2f85c..ec3bad3 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -46,7 +46,7 @@ InterfaceSetupImp::~InterfaceSetupImp(){
46bool InterfaceSetupImp::saveChanges(){ 46bool InterfaceSetupImp::saveChanges(){
47 bool error; 47 bool error;
48 QString iface = interfaces->getInterfaceName(error); 48 QString iface = interfaces->getInterfaceName(error);
49 qDebug("InterfaceSetupImp::saveChanges saves interface %s", iface.latin1() ); 49 odebug << "InterfaceSetupImp::saveChanges saves interface " << iface.latin1() << "" << oendl;
50 if(!saveSettings()) 50 if(!saveSettings())
51 return false; 51 return false;
52 52
@@ -72,7 +72,7 @@ bool InterfaceSetupImp::saveChanges(){
72 qApp->processEvents(); 72 qApp->processEvents();
73 73
74 if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) { 74 if (!restart.start(OProcess::Block, OProcess::NoCommunication) ) {
75 qWarning("unstable to spawn ifdown/ifup"); 75 owarn << "unstable to spawn ifdown/ifup" << oendl;
76 } 76 }
77 77
78 owait->hide(); 78 owait->hide();
@@ -157,7 +157,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){
157 if(!interfaces->setMapping(interface->getInterfaceName())){ 157 if(!interfaces->setMapping(interface->getInterfaceName())){
158 interfaces->addMapping(interface->getInterfaceName()); 158 interfaces->addMapping(interface->getInterfaceName());
159 if(!interfaces->setMapping(interface->getInterfaceName())){ 159 if(!interfaces->setMapping(interface->getInterfaceName())){
160 qDebug("InterfaceSetupImp: Added Mapping, but still can't setInterface."); 160 odebug << "InterfaceSetupImp: Added Mapping, but still can't setInterface." << oendl;
161 return; 161 return;
162 } 162 }
163 } 163 }
@@ -167,7 +167,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){
167 else{ 167 else{
168 interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP); 168 interfaces->addInterface(newInterfaceName, INTERFACES_FAMILY_INET, INTERFACES_METHOD_DHCP);
169 if(!interfaces->setInterface(newInterfaceName)){ 169 if(!interfaces->setInterface(newInterfaceName)){
170 qDebug("InterfaceSetupImp: Added interface, but still can't setInterface."); 170 odebug << "InterfaceSetupImp: Added interface, but still can't setInterface." << oendl;
171 return; 171 return;
172 } 172 }
173 } 173 }
@@ -185,7 +185,7 @@ void InterfaceSetupImp::setProfile(const QString &profile){
185 // IP Information 185 // IP Information
186 autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName())); 186 autoStart->setChecked(interfaces->isAuto(interface->getInterfaceName()));
187 QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error); 187 QString dns = interfaces->getInterfaceOption("up "DNSSCRIPT" -a", error);
188 qDebug("dns >%s<",dns.latin1()); 188 odebug << "dns >" << dns.latin1() << "<" << oendl;
189 if(dns.contains(" ")){ 189 if(dns.contains(" ")){
190 firstDNSLineEdit->setText(dns.mid(0, dns.find(" "))); 190 firstDNSLineEdit->setText(dns.mid(0, dns.find(" ")));
191 secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length())); 191 secondDNSLineEdit->setText(dns.mid(dns.find(" ")+1, dns.length()));
@@ -199,8 +199,8 @@ void InterfaceSetupImp::setProfile(const QString &profile){
199 199
200 200
201 201
202 qWarning("InterfaceSetupImp::setProfile(%s)\n", profile.latin1()); 202 owarn << "InterfaceSetupImp::setProfile(" << profile.latin1() << ")\n" << oendl;
203 qWarning("InterfaceSetupImp::setProfile: iface is %s\n", interfaces->getInterfaceName(error).latin1()); 203 owarn << "InterfaceSetupImp::setProfile: iface is " << interfaces->getInterfaceName(error).latin1() << "\n" << oendl;
204 204
205} 205}
206 206
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 1e16b97..3e1a650 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -79,7 +79,7 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi
79 */ 79 */
80 if (m_handledIfaces.contains( *ni) ) 80 if (m_handledIfaces.contains( *ni) )
81 { 81 {
82 qDebug("Not up iface handled by module"); 82 odebug << "Not up iface handled by module" << oendl;
83 continue; 83 continue;
84 } 84 }
85 bool found = false; 85 bool found = false;
@@ -219,7 +219,7 @@ void MainWindowImp::getAllInterfaces()
219 int flags = 0; 219 int flags = 0;
220 if ( m_handledIfaces.contains( (*it) ) ) 220 if ( m_handledIfaces.contains( (*it) ) )
221 { 221 {
222 qDebug(" %s is handled by a module", (*it).latin1() ); 222 odebug << " " << (*it).latin1() << " is handled by a module" << oendl;
223 continue; 223 continue;
224 } 224 }
225 // int family; 225 // int family;
@@ -249,7 +249,7 @@ void MainWindowImp::getAllInterfaces()
249 else 249 else
250 i->setHardwareName("Unknown"); 250 i->setHardwareName("Unknown");
251 251
252 qWarning("Adding interface %s to interfaceNames\n", ifr.ifr_name); 252 owarn << "Adding interface " << ifr.ifr_name << " to interfaceNames\n" << oendl;
253 interfaceNames.insert(i->getInterfaceName(), i); 253 interfaceNames.insert(i->getInterfaceName(), i);
254 updateInterface(i); 254 updateInterface(i);
255 connect(i, SIGNAL(updateInterface(Interface*)), 255 connect(i, SIGNAL(updateInterface(Interface*)),
@@ -265,7 +265,7 @@ void MainWindowImp::getAllInterfaces()
265 ilist = it.key()->getInterfaces(); 265 ilist = it.key()->getInterfaces();
266 for( i = ilist.first(); i != 0; i = ilist.next() ) 266 for( i = ilist.first(); i != 0; i = ilist.next() )
267 { 267 {
268 qWarning("Adding interface %s to interfaceNames\n", i->getInterfaceName().latin1() ); 268 owarn << "Adding interface " << i->getInterfaceName().latin1() << " to interfaceNames\n" << oendl;
269 interfaceNames.insert(i->getInterfaceName(), i); 269 interfaceNames.insert(i->getInterfaceName(), i);
270 updateInterface(i); 270 updateInterface(i);
271 connect(i, SIGNAL(updateInterface(Interface*)), 271 connect(i, SIGNAL(updateInterface(Interface*)),
@@ -283,7 +283,7 @@ void MainWindowImp::getAllInterfaces()
283void MainWindowImp::loadModules(const QString &path) 283void MainWindowImp::loadModules(const QString &path)
284{ 284{
285#ifdef DEBUG 285#ifdef DEBUG
286 qDebug("MainWindowImp::loadModules: %s", path.latin1()); 286 odebug << "MainWindowImp::loadModules: " << path.latin1() << "" << oendl;
287#endif 287#endif
288 QDir d(path); 288 QDir d(path);
289 if(!d.exists()) 289 if(!d.exists())
@@ -304,7 +304,7 @@ void MainWindowImp::loadModules(const QString &path)
304 { 304 {
305#endif 305#endif
306 loadPlugin(path + "/" + fi->fileName()); 306 loadPlugin(path + "/" + fi->fileName());
307 qDebug("loaded plugin: >%s< ",QString(path + "/" + fi->fileName()).latin1()); 307 odebug << "loaded plugin: >" << QString(path + "/" + fi->fileName()).latin1() << "< " << oendl;
308 } 308 }
309 ++it; 309 ++it;
310 } 310 }
@@ -319,7 +319,7 @@ void MainWindowImp::loadModules(const QString &path)
319Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString) 319Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &resolveString)
320{ 320{
321#ifdef DEBUG 321#ifdef DEBUG
322 qDebug("MainWindowImp::loadPlugin: %s: resolving %s", pluginFileName.latin1(), resolveString.latin1()); 322 odebug << "MainWindowImp::loadPlugin: " << pluginFileName.latin1() << ": resolving " << resolveString.latin1() << "" << oendl;
323#endif 323#endif
324#ifdef QWS 324#ifdef QWS
325 QLibrary *lib = new QLibrary(pluginFileName); 325 QLibrary *lib = new QLibrary(pluginFileName);
@@ -327,7 +327,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
327 if( !functionPointer ) 327 if( !functionPointer )
328 { 328 {
329#ifdef DEBUG 329#ifdef DEBUG
330 qDebug("MainWindowImp::loadPlugin: Warning: %s is not a plugin", pluginFileName.latin1()); 330 odebug << "MainWindowImp::loadPlugin: Warning: " << pluginFileName.latin1() << " is not a plugin" << oendl;
331#endif 331#endif
332 delete lib; 332 delete lib;
333 return NULL; 333 return NULL;
@@ -337,7 +337,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
337 if(object == NULL) 337 if(object == NULL)
338 { 338 {
339#ifdef DEBUG 339#ifdef DEBUG
340 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 340 odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl;
341#endif 341#endif
342 delete lib; 342 delete lib;
343 return NULL; 343 return NULL;
@@ -352,7 +352,7 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
352 QLibrary *lib = loader->library(pluginFileName); 352 QLibrary *lib = loader->library(pluginFileName);
353 if( !lib || !lib->hasSymbol(resolveString) ) 353 if( !lib || !lib->hasSymbol(resolveString) )
354 { 354 {
355 qDebug(QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); 355 odebug << QString("MainWindowImp::loadPlugin: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1() << oendl;
356 return NULL; 356 return NULL;
357 } 357 }
358 // Try to get an object. 358 // Try to get an object.
@@ -360,12 +360,12 @@ Module* MainWindowImp::loadPlugin(const QString &pluginFileName, const QString &
360 if(object == NULL) 360 if(object == NULL)
361 { 361 {
362#ifdef DEBUG 362#ifdef DEBUG
363 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 363 odebug << "MainWindowImp: Couldn't create object, but did load library!" << oendl;
364#endif 364#endif
365 return NULL; 365 return NULL;
366 } 366 }
367#ifdef DEBUG 367#ifdef DEBUG
368 qDebug("MainWindowImp::loadPlugin:: Found object, storing."); 368 odebug << "MainWindowImp::loadPlugin:: Found object, storing." << oendl;
369#endif 369#endif
370 // Store for deletion later 370 // Store for deletion later
371 libraries.insert(object, lib); 371 libraries.insert(object, lib);
@@ -411,7 +411,7 @@ void MainWindowImp::addClicked()
411 Interface *i = (it.key())->addNewInterface(item->text(0)); 411 Interface *i = (it.key())->addNewInterface(item->text(0));
412 if(i) 412 if(i)
413 { 413 {
414 qDebug("iface name %s",i->getInterfaceName().latin1()); 414 odebug << "iface name " << i->getInterfaceName().latin1() << "" << oendl;
415 interfaceNames.insert(i->getInterfaceName(), i); 415 interfaceNames.insert(i->getInterfaceName(), i);
416 updateInterface(i); 416 updateInterface(i);
417 } 417 }
@@ -513,7 +513,7 @@ void MainWindowImp::informationClicked()
513 { 513 {
514 QPEApplication::showWidget( moduleInformation ); 514 QPEApplication::showWidget( moduleInformation );
515#ifdef DEBUG 515#ifdef DEBUG
516 qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); 516 odebug << "MainWindowImp::informationClicked:: Module owner has created, we showed." << oendl;
517#endif 517#endif
518 return; 518 return;
519 } 519 }
@@ -650,7 +650,7 @@ void MainWindowImp::removeProfile()
650 for( it = items.begin(); it != items.end(); ++it ) 650 for( it = items.begin(); it != items.end(); ++it )
651 { 651 {
652 QString interfaceName = it.key()->getInterfaceName(); 652 QString interfaceName = it.key()->getInterfaceName();
653 qDebug(interfaceName.latin1()); 653 odebug << interfaceName.latin1() << oendl;
654 if(interfaces.setInterface(interfaceName + "_" + profileToRemove)) 654 if(interfaces.setInterface(interfaceName + "_" + profileToRemove))
655 { 655 {
656 interfaces.removeInterface(); 656 interfaces.removeInterface();
@@ -719,7 +719,7 @@ void MainWindowImp::makeChannel()
719void MainWindowImp::receive(const QCString &msg, const QByteArray &arg) 719void MainWindowImp::receive(const QCString &msg, const QByteArray &arg)
720{ 720{
721 bool found = false; 721 bool found = false;
722 qDebug("MainWindowImp::receive QCop msg >"+msg+"<"); 722 odebug << "MainWindowImp::receive QCop msg >"+msg+"<" << oendl;
723 if (msg == "raise") 723 if (msg == "raise")
724 { 724 {
725 raise(); 725 raise();
@@ -729,12 +729,12 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg)
729 QString dest = msg.left(msg.find("(")); 729 QString dest = msg.left(msg.find("("));
730 QCString param = msg.right(msg.length() - msg.find("(") - 1); 730 QCString param = msg.right(msg.length() - msg.find("(") - 1);
731 param = param.left( param.length() - 1 ); 731 param = param.left( param.length() - 1 );
732 qDebug("dest >%s< param >"+param+"<",dest.latin1()); 732 odebug << "dest >" << dest.latin1() << "< param >"+param+"<" << oendl;
733 733
734 QMap<Module*, QLibrary*>::Iterator it; 734 QMap<Module*, QLibrary*>::Iterator it;
735 for( it = libraries.begin(); it != libraries.end(); ++it ) 735 for( it = libraries.begin(); it != libraries.end(); ++it )
736 { 736 {
737 qDebug("plugin >%s<", it.key()->type().latin1() ); 737 odebug << "plugin >" << it.key()->type().latin1() << "<" << oendl;
738 if(it.key()->type() == dest) 738 if(it.key()->type() == dest)
739 { 739 {
740 it.key()->receive( param, arg ); 740 it.key()->receive( param, arg );
@@ -744,5 +744,5 @@ void MainWindowImp::receive(const QCString &msg, const QByteArray &arg)
744 744
745 745
746 if (found) QPEApplication::setKeepRunning(); 746 if (found) QPEApplication::setKeepRunning();
747 else qDebug("Huh what do ya want"); 747 else odebug << "Huh what do ya want" << oendl;
748} 748}
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp
index b8a1925a..aedc0b9 100644
--- a/noncore/settings/networksettings/ppp/accounts.cpp
+++ b/noncore/settings/networksettings/ppp/accounts.cpp
@@ -118,7 +118,7 @@ void AccountWidget::create()
118 int result; 118 int result;
119 if (_pppdata->newaccount() == -1) 119 if (_pppdata->newaccount() == -1)
120 { 120 {
121 qDebug("_pppdata->newaccount() == -1"); 121 odebug << "_pppdata->newaccount() == -1" << oendl;
122 return; 122 return;
123 } 123 }
124 result = doTab(); 124 result = doTab();
diff --git a/noncore/settings/networksettings/ppp/authwidget.cpp b/noncore/settings/networksettings/ppp/authwidget.cpp
index fa2b164..f3d842f 100644
--- a/noncore/settings/networksettings/ppp/authwidget.cpp
+++ b/noncore/settings/networksettings/ppp/authwidget.cpp
@@ -142,7 +142,7 @@ void AuthWidget::save()
142 142
143void AuthWidget::authChanged( const QString &authStr ) 143void AuthWidget::authChanged( const QString &authStr )
144{ 144{
145 qDebug("AuthWidget::authChanged( %s )", authStr.latin1() ); 145 odebug << "AuthWidget::authChanged( " << authStr.latin1() << " )" << oendl;
146 if ( authStr.contains( tr("Script-based") ) ){ 146 if ( authStr.contains( tr("Script-based") ) ){
147 showUsernamePassword( false ); 147 showUsernamePassword( false );
148 showScriptWindow( true ); 148 showScriptWindow( true );
@@ -151,7 +151,7 @@ void AuthWidget::authChanged( const QString &authStr )
151 showUsernamePassword( true ); 151 showUsernamePassword( true );
152 showScriptWindow( false ); 152 showScriptWindow( false );
153 } else { 153 } else {
154 qDebug("do not really know how to handle"); 154 odebug << "do not really know how to handle" << oendl;
155 showUsernamePassword( false ); 155 showUsernamePassword( false );
156 showScriptWindow( false ); 156 showScriptWindow( false );
157 } 157 }
diff --git a/noncore/settings/networksettings/ppp/connect.cpp b/noncore/settings/networksettings/ppp/connect.cpp
index e3fab24..b75410c 100644
--- a/noncore/settings/networksettings/ppp/connect.cpp
+++ b/noncore/settings/networksettings/ppp/connect.cpp
@@ -472,7 +472,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
472 scriptCommand = *(comlist->at(scriptindex)); 472 scriptCommand = *(comlist->at(scriptindex));
473 scriptArgument = *(arglist->at(scriptindex)); 473 scriptArgument = *(arglist->at(scriptindex));
474 } else { 474 } else {
475 qDebug( "End of script" ); 475 odebug << "End of script" << oendl;
476 vmain = 10; 476 vmain = 10;
477 return; 477 return;
478 } 478 }
@@ -838,7 +838,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
838 killTimer( main_timer_ID ); 838 killTimer( main_timer_ID );
839 839
840 if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000); 840 if_timeout_timer->start(_ifaceppp->data()->pppdTimeout()*1000);
841 qDebug( "started if timeout timer with %i", _ifaceppp->data()->pppdTimeout()*1000); 841 odebug << "started if timeout timer with " << _ifaceppp->data()->pppdTimeout()*1000 << "" << oendl;
842 842
843 // find out PPP interface and notify the stats module 843 // find out PPP interface and notify the stats module
844// stats->setUnit(pppInterfaceNumber()); 844// stats->setUnit(pppInterfaceNumber());
@@ -848,7 +848,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
848 result = execppp(); 848 result = execppp();
849 849
850 emit debugMessage(QObject::tr("Starting pppd...")); 850 emit debugMessage(QObject::tr("Starting pppd..."));
851 qDebug("execppp() returned with return-code %i", result ); 851 odebug << "execppp() returned with return-code " << result << "" << oendl;
852 852
853 if(result) { 853 if(result) {
854 if(!_ifaceppp->data()->autoDNS()) 854 if(!_ifaceppp->data()->autoDNS())
@@ -1064,7 +1064,7 @@ void ConnectWidget::setExpect(const QString &n) {
1064void ConnectWidget::if_waiting_timed_out() { 1064void ConnectWidget::if_waiting_timed_out() {
1065 if_timer->stop(); 1065 if_timer->stop();
1066 if_timeout_timer->stop(); 1066 if_timeout_timer->stop();
1067 qDebug("if_waiting_timed_out()"); 1067 odebug << "if_waiting_timed_out()" << oendl;
1068 1068
1069 _ifaceppp->data()->setpppdError(E_IF_TIMEOUT); 1069 _ifaceppp->data()->setpppdError(E_IF_TIMEOUT);
1070 1070
@@ -1271,7 +1271,7 @@ bool ConnectWidget::execppp() {
1271 return false; // nonsensically long command which would bust my buffer buf. 1271 return false; // nonsensically long command which would bust my buffer buf.
1272 } 1272 }
1273 1273
1274 qWarning("Command IS: %s",command.latin1() ); 1274 owarn << "Command IS: " << command.latin1() << "" << oendl;
1275 1275
1276 qApp->flushX(); 1276 qApp->flushX();
1277 1277
diff --git a/noncore/settings/networksettings/ppp/devices.cpp b/noncore/settings/networksettings/ppp/devices.cpp
index 9da090d..350ff32 100644
--- a/noncore/settings/networksettings/ppp/devices.cpp
+++ b/noncore/settings/networksettings/ppp/devices.cpp
@@ -72,11 +72,11 @@ DevicesWidget::DevicesWidget( InterfacePPP* ip, QWidget *parent, const char *nam
72// delete_b->setEnabled( false ); //FIXME 72// delete_b->setEnabled( false ); //FIXME
73 73
74 QStringList tmp = _pppdata->getDevicesNamesList(); 74 QStringList tmp = _pppdata->getDevicesNamesList();
75 qDebug("DevicesWidget::DevicesWidget got devices %s",tmp.join("--").latin1()); 75 odebug << "DevicesWidget::DevicesWidget got devices " << tmp.join("--").latin1() << "" << oendl;
76 listListbox->insertStringList(tmp); 76 listListbox->insertStringList(tmp);
77 77
78 for (uint i = 0; i < listListbox->count(); i++){ 78 for (uint i = 0; i < listListbox->count(); i++){
79 qDebug("listListbox->text(i) %s == _pppdata->devname() %s",listListbox->text(i).latin1(), _pppdata->devname().latin1()); 79 odebug << "listListbox->text(i) " << listListbox->text(i).latin1() << " == _pppdata->devname() " << _pppdata->devname().latin1() << "" << oendl;
80 if ( listListbox->text(i) == _pppdata->devname() ) 80 if ( listListbox->text(i) == _pppdata->devname() )
81 listListbox->setCurrentItem( i ); 81 listListbox->setCurrentItem( i );
82 } 82 }
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index 81dab38..69bb682 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -335,7 +335,7 @@ bool ModemWidget::save()
335 !_pppdata->isUniqueDevname(modemname->text())) 335 !_pppdata->isUniqueDevname(modemname->text()))
336 return false; 336 return false;
337 337
338 qDebug("ModemWidget::save saving modem1 data"); 338 odebug << "ModemWidget::save saving modem1 data" << oendl;
339 _pppdata->setDevname( modemname->text() ); 339 _pppdata->setDevname( modemname->text() );
340 _pppdata->setModemDevice( modemdevice->currentText() ); 340 _pppdata->setModemDevice( modemdevice->currentText() );
341 _pppdata->setFlowcontrol(flowcontrol->currentText()); 341 _pppdata->setFlowcontrol(flowcontrol->currentText());
diff --git a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
index 6b158b9..5a76293 100644
--- a/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceinformationppp.cpp
@@ -20,7 +20,7 @@
20InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f) 20InterfaceInformationPPP::InterfaceInformationPPP(QWidget *parent, const char *name, Interface *i, WFlags f)
21 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp) 21 :InterfaceInformationImp(parent, name, i, Qt::WStyle_ContextHelp)
22{ 22{
23 qDebug("InterfaceInformationPPP::InterfaceInformationPPP %s", name); 23 odebug << "InterfaceInformationPPP::InterfaceInformationPPP " << name << "" << oendl;
24 con = new ConnectWidget( (InterfacePPP*)i, this, "con" ); 24 con = new ConnectWidget( (InterfacePPP*)i, this, "con" );
25 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, 25 con->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding,
26 QSizePolicy::Fixed) ); 26 QSizePolicy::Fixed) );
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp
index f443f3c..5cc6f70 100644
--- a/noncore/settings/networksettings/ppp/interfaceppp.cpp
+++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp
@@ -14,13 +14,13 @@ InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status)
14 _modemPtr(0), 14 _modemPtr(0),
15 _dataPtr(0) 15 _dataPtr(0)
16{ 16{
17 qDebug("InterfacePPP::InterfacePPP("); 17 odebug << "InterfacePPP::InterfacePPP(" << oendl;
18} 18}
19 19
20PPPData* InterfacePPP::data()const 20PPPData* InterfacePPP::data()const
21{ 21{
22 if (!_dataPtr){ 22 if (!_dataPtr){
23 qDebug("creating new Data obj"); 23 odebug << "creating new Data obj" << oendl;
24 _dataPtr = new PPPData(); 24 _dataPtr = new PPPData();
25 _dataPtr->setDevice( getInterfaceName() ); 25 _dataPtr->setDevice( getInterfaceName() );
26 _dataPtr->setAccount( getHardwareName() ); 26 _dataPtr->setAccount( getHardwareName() );
@@ -31,7 +31,7 @@ PPPData* InterfacePPP::data()const
31Modem* InterfacePPP::modem()const 31Modem* InterfacePPP::modem()const
32{ 32{
33 if (!_modemPtr){ 33 if (!_modemPtr){
34 qDebug("creating new modem obj"); 34 odebug << "creating new modem obj" << oendl;
35 _modemPtr = new Modem( data() ); 35 _modemPtr = new Modem( data() );
36 } 36 }
37 return _modemPtr; 37 return _modemPtr;
@@ -39,7 +39,7 @@ Modem* InterfacePPP::modem()const
39 39
40bool InterfacePPP::refresh() 40bool InterfacePPP::refresh()
41{ 41{
42 qDebug("InterfacePPP::refresh()"); 42 odebug << "InterfacePPP::refresh()" << oendl;
43 QString old = getInterfaceName(); 43 QString old = getInterfaceName();
44 setInterfaceName( modem()->pppDevice() ); 44 setInterfaceName( modem()->pppDevice() );
45 45
@@ -53,7 +53,7 @@ bool InterfacePPP::refresh()
53 53
54void InterfacePPP::start() 54void InterfacePPP::start()
55{ 55{
56 qDebug("InterfacePPP::start"); 56 odebug << "InterfacePPP::start" << oendl;
57 57
58 if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) { 58 if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) {
59 59
@@ -143,12 +143,12 @@ void InterfacePPP::start()
143 143
144 emit begin_connect(); 144 emit begin_connect();
145 145
146 qDebug("InterfacePPP::start END"); 146 odebug << "InterfacePPP::start END" << oendl;
147} 147}
148 148
149void InterfacePPP::stop() 149void InterfacePPP::stop()
150{ 150{
151 qDebug("InterfacePPP::stop"); 151 odebug << "InterfacePPP::stop" << oendl;
152 // emit hangup_now(); 152 // emit hangup_now();
153 status = false; // not connected 153 status = false; // not connected
154 setStatus( false ); 154 setStatus( false );
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp
index e21bbc7..fd09332 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.cpp
+++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp
@@ -74,13 +74,13 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
74 // before doing anything else, run a few tests 74 // before doing anything else, run a few tests
75 if (!_pppdata->setModemDevice( i->getInterfaceName() )) 75 if (!_pppdata->setModemDevice( i->getInterfaceName() ))
76 _pppdata->setModemDevice("/dev/modem"); 76 _pppdata->setModemDevice("/dev/modem");
77 qDebug("PPPConfigWidget::PPPConfigWidget"); 77 odebug << "PPPConfigWidget::PPPConfigWidget" << oendl;
78 qDebug(" interface->getHardwareName >%s<", i->getHardwareName().latin1()); 78 odebug << " interface->getHardwareName >" << i->getHardwareName().latin1() << "<" << oendl;
79 if (!_pppdata->setAccount( i->getHardwareName() )) 79 if (!_pppdata->setAccount( i->getHardwareName() ))
80 _pppdata->setAccount( 0 ); 80 _pppdata->setAccount( 0 );
81 81
82 qDebug(" _pppdata->accname >%s<",_pppdata->accname().latin1()); 82 odebug << " _pppdata->accname >" << _pppdata->accname().latin1() << "<" << oendl;
83 qDebug(" _pppdata->currentAccountID() >%i<",_pppdata->currentAccountID()); 83 odebug << " _pppdata->currentAccountID() >" << _pppdata->currentAccountID() << "<" << oendl;
84 84
85 int result = runTests(); 85 int result = runTests();
86 if(result == TEST_CRITICAL) 86 if(result == TEST_CRITICAL)
@@ -305,7 +305,7 @@ KPPPWidget::~KPPPWidget()
305// if(e->type() == QEvent::User) { 305// if(e->type() == QEvent::User) {
306// switch(((SignalEvent*)e)->sigType()) { 306// switch(((SignalEvent*)e)->sigType()) {
307// case SIGINT: 307// case SIGINT:
308// qDebug( "Received a SIGINT" ); 308// odebug << "Received a SIGINT" << oendl;
309// interruptConnection(); 309// interruptConnection();
310// break; 310// break;
311// case SIGCHLD: 311// case SIGCHLD:
@@ -423,13 +423,13 @@ void KPPPWidget::interruptConnection() {
423 423
424 424
425void KPPPWidget::sigPPPDDied() { 425void KPPPWidget::sigPPPDDied() {
426 qDebug( "Received a SIGUSR1" ); 426 odebug << "Received a SIGUSR1" << oendl;
427 427
428 // if we are not connected pppdpid is -1 so have have to check for that 428 // if we are not connected pppdpid is -1 so have have to check for that
429 // in the followin line to make sure that we don't raise a false alarm 429 // in the followin line to make sure that we don't raise a false alarm
430 // such as would be the case when the log file viewer exits. 430 // such as would be the case when the log file viewer exits.
431 if(_pppdata->pppdRunning() || _pppdata->pppdError()) { 431 if(_pppdata->pppdRunning() || _pppdata->pppdError()) {
432 qDebug( "It was pppd that died" ); 432 odebug << "It was pppd that died" << oendl;
433 433
434 // when we killpppd() on Cancel in ConnectWidget 434 // when we killpppd() on Cancel in ConnectWidget
435 // we set pppid to -1 so we won't 435 // we set pppid to -1 so we won't
@@ -442,7 +442,7 @@ void KPPPWidget::sigPPPDDied() {
442 442
443 _pppdata->setpppdRunning(false); 443 _pppdata->setpppdRunning(false);
444 444
445 qDebug( "Executing command on disconnect since pppd has died." ); 445 odebug << "Executing command on disconnect since pppd has died." << oendl;
446 QApplication::flushX(); 446 QApplication::flushX();
447 execute_command(_pppdata->command_on_disconnect()); 447 execute_command(_pppdata->command_on_disconnect());
448 448
@@ -489,7 +489,7 @@ void KPPPWidget::sigPPPDDied() {
489 // // PPPL_ShowLog(); 489 // // PPPL_ShowLog();
490// } else { /* reconnect on disconnect */ 490// } else { /* reconnect on disconnect */
491 if (false){ 491 if (false){
492 qDebug( "Trying to reconnect... " ); 492 odebug << "Trying to reconnect... " << oendl;
493 493
494 if(_pppdata->authMethod() == AUTH_PAP || 494 if(_pppdata->authMethod() == AUTH_PAP ||
495 _pppdata->authMethod() == AUTH_CHAP || 495 _pppdata->authMethod() == AUTH_CHAP ||
@@ -511,7 +511,7 @@ void KPPPWidget::sigPPPDDied() {
511} 511}
512 512
513// void KPPPWidget::sigChld() { 513// void KPPPWidget::sigChld() {
514// qDebug( "sigchld()" ); 514// odebug << "sigchld()" << oendl;
515// // pid_t id = wait(0L); 515// // pid_t id = wait(0L);
516// // if(id == helperPid && helperPid != -1) { 516// // if(id == helperPid && helperPid != -1) {
517// // kdDebug(5002) << "It was the setuid child that died" << endl; 517// // kdDebug(5002) << "It was the setuid child that died" << endl;
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp
index 3dbc8c3..f3f2639 100644
--- a/noncore/settings/networksettings/ppp/modem.cpp
+++ b/noncore/settings/networksettings/ppp/modem.cpp
@@ -55,7 +55,7 @@
55 55
56 56
57#define MY_ASSERT(x) if (!(x)) { \ 57#define MY_ASSERT(x) if (!(x)) { \
58 qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \ 58 ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \
59 exit(1); } 59 exit(1); }
60 60
61 61
@@ -165,7 +165,7 @@ bool Modem::opentty() {
165 close(modemfd); 165 close(modemfd);
166 device = _pppdata->modemDevice(); 166 device = _pppdata->modemDevice();
167 if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) { 167 if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) {
168 qDebug("error opening modem device !"); 168 odebug << "error opening modem device !" << oendl;
169 errmsg = QObject::tr("Unable to open modem."); 169 errmsg = QObject::tr("Unable to open modem.");
170 return false; 170 return false;
171 } 171 }
@@ -306,9 +306,9 @@ void Modem::startNotifier() {
306 if(sn == 0) { 306 if(sn == 0) {
307 sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this); 307 sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this);
308 connect(sn, SIGNAL(activated(int)), SLOT(readtty(int))); 308 connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
309 qDebug("QSocketNotifier started!"); 309 odebug << "QSocketNotifier started!" << oendl;
310 } else { 310 } else {
311 qDebug("QSocketNotifier re-enabled!"); 311 odebug << "QSocketNotifier re-enabled!" << oendl;
312 sn->setEnabled(true); 312 sn->setEnabled(true);
313 } 313 }
314 } 314 }
@@ -321,7 +321,7 @@ void Modem::stopNotifier() {
321 disconnect(sn); 321 disconnect(sn);
322 delete sn; 322 delete sn;
323 sn = 0; 323 sn = 0;
324 qDebug( "QSocketNotifier stopped!" ); 324 odebug << "QSocketNotifier stopped!" << oendl;
325 } 325 }
326} 326}
327 327
@@ -337,7 +337,7 @@ bool Modem::writeChar(unsigned char c) {
337 do { 337 do {
338 s = write(modemfd, &c, 1); 338 s = write(modemfd, &c, 1);
339 if (s < 0) { 339 if (s < 0) {
340 qError( "write() in Modem::writeChar failed" ); 340 oerr << "write() in Modem::writeChar failed" << oendl;
341 return false; 341 return false;
342 } 342 }
343 } while(s == 0); 343 } while(s == 0);
@@ -365,7 +365,7 @@ bool Modem::writeLine(const char *buf) {
365 int wr = write(modemfd, &b[len-l], l); 365 int wr = write(modemfd, &b[len-l], l);
366 if(wr < 0) { 366 if(wr < 0) {
367 // TODO do something meaningful with the error code (or ignore it 367 // TODO do something meaningful with the error code (or ignore it
368 qError( "write() in Modem::writeLine failed" ); 368 oerr << "write() in Modem::writeLine failed" << oendl;
369 delete[] b; 369 delete[] b;
370 return false; 370 return false;
371 } 371 }
@@ -474,7 +474,7 @@ QString Modem::parseModemSpeed(const QString &s) {
474 int i; 474 int i;
475 QString result; 475 QString result;
476 476
477 qDebug( "Modem reported result string: %s", s.latin1()); 477 odebug << "Modem reported result string: " << s.latin1() << "" << oendl;
478 478
479 const int RXMAX = 7; 479 const int RXMAX = 7;
480 const int TXMAX = 2; 480 const int TXMAX = 2;
@@ -560,7 +560,7 @@ QString Modem::parseModemSpeed(const QString &s) {
560 else 560 else
561 result.sprintf("%d/%d", rx, tx); 561 result.sprintf("%d/%d", rx, tx);
562 562
563 qDebug( "The parsed result is: %s", result.latin1()); 563 odebug << "The parsed result is: " << result.latin1() << "" << oendl;
564 564
565 return result; 565 return result;
566} 566}
@@ -573,7 +573,7 @@ int Modem::lockdevice() {
573 char newlock[80]=""; // safe 573 char newlock[80]=""; // safe
574 574
575 if(!_pppdata->modemLockFile()) { 575 if(!_pppdata->modemLockFile()) {
576 qDebug("The user doesn't want a lockfile."); 576 odebug << "The user doesn't want a lockfile." << oendl;
577 return 0; 577 return 0;
578 } 578 }
579 579
@@ -595,7 +595,7 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
595 return 1; 595 return 1;
596 oldlock[sz] = '\0'; 596 oldlock[sz] = '\0';
597 597
598 qDebug( "Device is locked by: %s", oldlock); 598 odebug << "Device is locked by: " << oldlock << "" << oendl;
599 599
600 int oldpid; 600 int oldpid;
601 int match = sscanf(oldlock, "%d", &oldpid); 601 int match = sscanf(oldlock, "%d", &oldpid);
@@ -608,14 +608,14 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
608 if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH) 608 if (kill((pid_t)oldpid, 0) == 0 || errno != ESRCH)
609 return 1; 609 return 1;
610 610
611 qDebug( "lockfile is stale" ); 611 odebug << "lockfile is stale" << oendl;
612 } 612 }
613 } 613 }
614 614
615 fd = openLockfile(_pppdata->modemDevice(),O_WRONLY|O_TRUNC|O_CREAT); 615 fd = openLockfile(_pppdata->modemDevice(),O_WRONLY|O_TRUNC|O_CREAT);
616 if(fd >= 0) { 616 if(fd >= 0) {
617 sprintf(newlock,"%010d\n", getpid()); 617 sprintf(newlock,"%010d\n", getpid());
618 qDebug("Locking Device: %s", newlock); 618 odebug << "Locking Device: " << newlock << "" << oendl;
619 619
620 write(fd, newlock, strlen(newlock)); 620 write(fd, newlock, strlen(newlock));
621 close(fd); 621 close(fd);
@@ -632,7 +632,7 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
632// UnLock modem device 632// UnLock modem device
633void Modem::unlockdevice() { 633void Modem::unlockdevice() {
634 if (modem_is_locked) { 634 if (modem_is_locked) {
635 qDebug( "UnLocking Modem Device" ); 635 odebug << "UnLocking Modem Device" << oendl;
636 close(modemfd); 636 close(modemfd);
637 modemfd = -1; 637 modemfd = -1;
638 unlink(lockfile); 638 unlink(lockfile);
@@ -654,7 +654,7 @@ int Modem::openLockfile( QString lockfile, int flags)
654 lockfile = LOCK_DIR; 654 lockfile = LOCK_DIR;
655 lockfile += "/LCK.."; 655 lockfile += "/LCK..";
656 lockfile += device.right( device.length() - device.findRev("/") -1 ); 656 lockfile += device.right( device.length() - device.findRev("/") -1 );
657 qDebug("lockfile >%s<",lockfile.latin1()); 657 odebug << "lockfile >" << lockfile.latin1() << "<" << oendl;
658 // TODO: 658 // TODO:
659 // struct stat st; 659 // struct stat st;
660 // if(stat(lockfile.data(), &st) == -1) { 660 // if(stat(lockfile.data(), &st) == -1) {
@@ -666,7 +666,7 @@ int Modem::openLockfile( QString lockfile, int flags)
666 // return -1; 666 // return -1;
667 // } 667 // }
668 if ((fd = open(lockfile, flags, mode)) == -1) { 668 if ((fd = open(lockfile, flags, mode)) == -1) {
669 qDebug("error opening lockfile!"); 669 odebug << "error opening lockfile!" << oendl;
670 lockfile = QString::null; 670 lockfile = QString::null;
671 fd = open(DEVNULL, O_RDONLY); 671 fd = open(DEVNULL, O_RDONLY);
672 } else 672 } else
@@ -927,7 +927,7 @@ bool Modem::execpppd(const char *arguments) {
927 break; 927 break;
928 928
929 default: 929 default:
930 qDebug("In parent: pppd pid %d\n",pppdPid); 930 odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl;
931 close(modemfd); 931 close(modemfd);
932 932
933 ::close( m_pppdLOG[1] ); 933 ::close( m_pppdLOG[1] );
@@ -935,7 +935,7 @@ bool Modem::execpppd(const char *arguments) {
935 int flag = ::fcntl( m_pppdLOG[0], F_GETFL ); 935 int flag = ::fcntl( m_pppdLOG[0], F_GETFL );
936 936
937 if ( !(flag & O_NONBLOCK) ) { 937 if ( !(flag & O_NONBLOCK) ) {
938 qDebug("Setting nonblocking io"); 938 odebug << "Setting nonblocking io" << oendl;
939 flag |= O_NONBLOCK; 939 flag |= O_NONBLOCK;
940 ::fcntl(m_pppdLOG[0], F_SETFL, flag ); 940 ::fcntl(m_pppdLOG[0], F_SETFL, flag );
941 } 941 }
@@ -954,15 +954,15 @@ bool Modem::execpppd(const char *arguments) {
954 954
955 955
956bool Modem::killpppd() { 956bool Modem::killpppd() {
957 qDebug("In killpppd and pid is %d", pppdPid ); 957 odebug << "In killpppd and pid is " << pppdPid << "" << oendl;
958 if(pppdPid > 0) { 958 if(pppdPid > 0) {
959 delete m_modemDebug; 959 delete m_modemDebug;
960 m_modemDebug = 0; 960 m_modemDebug = 0;
961 qDebug("In killpppd(): Sending SIGTERM to %d\n", pppdPid); 961 odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl;
962 if(kill(pppdPid, SIGTERM) < 0) { 962 if(kill(pppdPid, SIGTERM) < 0) {
963 qDebug("Error terminating %d. Sending SIGKILL\n", pppdPid); 963 odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl;
964 if(kill(pppdPid, SIGKILL) < 0) { 964 if(kill(pppdPid, SIGKILL) < 0) {
965 qDebug("Error killing %d\n", pppdPid); 965 odebug << "Error killing " << pppdPid << "\n" << oendl;
966 return false; 966 return false;
967 } 967 }
968 } 968 }
@@ -1035,7 +1035,7 @@ int Modem::openResolv(int flags)
1035{ 1035{
1036 int fd; 1036 int fd;
1037 if ((fd = open(_PATH_RESCONF, flags)) == -1) { 1037 if ((fd = open(_PATH_RESCONF, flags)) == -1) {
1038 qDebug("error opening resolv.conf!"); 1038 odebug << "error opening resolv.conf!" << oendl;
1039 fd = open(DEVNULL, O_RDONLY); 1039 fd = open(DEVNULL, O_RDONLY);
1040 } 1040 }
1041 return fd; 1041 return fd;
@@ -1056,7 +1056,7 @@ pid_t Modem::pppPID()const {
1056 return pppdPid; 1056 return pppdPid;
1057} 1057}
1058void Modem::setPPPDPid( pid_t pid ) { 1058void Modem::setPPPDPid( pid_t pid ) {
1059 qDebug("Modem setting pid"); 1059 odebug << "Modem setting pid" << oendl;
1060 _pppdExitStatus = -1; 1060 _pppdExitStatus = -1;
1061 pppdPid = pid; 1061 pppdPid = pid;
1062 modemfd = -1; 1062 modemfd = -1;
diff --git a/noncore/settings/networksettings/ppp/pppconfig.cpp b/noncore/settings/networksettings/ppp/pppconfig.cpp
index 97baf31..a8c99fd 100644
--- a/noncore/settings/networksettings/ppp/pppconfig.cpp
+++ b/noncore/settings/networksettings/ppp/pppconfig.cpp
@@ -25,10 +25,10 @@ PPPConfigWidget::PPPConfigWidget( InterfacePPP* iface, QWidget *parent,
25 } 25 }
26 26
27 interface = iface; 27 interface = iface;
28 qDebug("PPPConfigWidget::PPPConfigWidget"); 28 odebug << "PPPConfigWidget::PPPConfigWidget" << oendl;
29 qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); 29 odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl;
30 30
31 qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); 31 odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl;
32 32
33 33
34 QVBoxLayout *layout = new QVBoxLayout( this ); 34 QVBoxLayout *layout = new QVBoxLayout( this );
@@ -58,9 +58,9 @@ PPPConfigWidget::~PPPConfigWidget()
58 58
59void PPPConfigWidget::accept() 59void PPPConfigWidget::accept()
60{ 60{
61 qDebug("PPPConfigWidget::accept"); 61 odebug << "PPPConfigWidget::accept" << oendl;
62 qDebug(" _pppdata->accname >%s<",interface->data()->accname().latin1()); 62 odebug << " _pppdata->accname >" << interface->data()->accname().latin1() << "<" << oendl;
63 qDebug(" interface->getHardwareName >%s<", interface->getHardwareName().latin1()); 63 odebug << " interface->getHardwareName >" << interface->getHardwareName().latin1() << "<" << oendl;
64 interface->setInterfaceName( interface->data()->devname() ); 64 interface->setInterfaceName( interface->data()->devname() );
65 interface->setHardwareName( interface->data()->accname() ); 65 interface->setHardwareName( interface->data()->accname() );
66 interface->save(); 66 interface->save();
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp
index f4727c1..567ccf8 100644
--- a/noncore/settings/networksettings/ppp/pppdata.cpp
+++ b/noncore/settings/networksettings/ppp/pppdata.cpp
@@ -56,8 +56,8 @@ PPPData::PPPData()
56 cfg.setGroup(GENERAL_GRP); 56 cfg.setGroup(GENERAL_GRP);
57 accountList = cfg.readListEntry(ACCOUNT_LIST, ',' ); 57 accountList = cfg.readListEntry(ACCOUNT_LIST, ',' );
58 deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' ); 58 deviceList = cfg.readListEntry(DEVICESNAMES_LIST, ',' );
59 qDebug("PPPData::PPPData has a accountList %s", accountList.join("---").latin1()); 59 odebug << "PPPData::PPPData has a accountList " << accountList.join("---").latin1() << "" << oendl;
60 qDebug("PPPData::PPPData has a deviceList %s", deviceList.join("---").latin1()); 60 odebug << "PPPData::PPPData has a deviceList " << deviceList.join("---").latin1() << "" << oendl;
61 61
62// if (highcount > MAX_ACCOUNTS) 62// if (highcount > MAX_ACCOUNTS)
63// highcount = MAX_ACCOUNTS; 63// highcount = MAX_ACCOUNTS;
@@ -86,7 +86,7 @@ Config PPPData::config()
86// 86//
87void PPPData::save() 87void PPPData::save()
88{ 88{
89 qDebug("PPPData saving data"); 89 odebug << "PPPData saving data" << oendl;
90 writeConfig(GENERAL_GRP, NUMACCOUNTS_KEY, count()); 90 writeConfig(GENERAL_GRP, NUMACCOUNTS_KEY, count());
91 writeConfig(GENERAL_GRP, NUMDEVICES_KEY, highcountdev + 1); 91 writeConfig(GENERAL_GRP, NUMDEVICES_KEY, highcountdev + 1);
92 QString key; 92 QString key;
@@ -100,9 +100,9 @@ void PPPData::save()
100 it != stringEntries.end(); ++it ){ 100 it != stringEntries.end(); ++it ){
101 QString val = it.data(); 101 QString val = it.data();
102 key = it.key(); 102 key = it.key();
103// qDebug("saving %s -> %s", key.latin1(), val.latin1() ); 103// odebug << "saving " << key.latin1() << " -> " << val.latin1() << "" << oendl;
104 keys = QStringList::split( "SEPARATOR", key ); 104 keys = QStringList::split( "SEPARATOR", key );
105 //qDebug("group >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); 105 //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl;
106 cfg.setGroup(keys[0]); 106 cfg.setGroup(keys[0]);
107 cfg.writeEntry(keys[1], val); 107 cfg.writeEntry(keys[1], val);
108 } 108 }
@@ -110,9 +110,9 @@ void PPPData::save()
110 it != intEntries.end(); ++it ){ 110 it != intEntries.end(); ++it ){
111 int val = it.data(); 111 int val = it.data();
112 key = it.key(); 112 key = it.key();
113// qDebug("saving %s -> %i", key.latin1(), val ); 113// odebug << "saving " << key.latin1() << " -> " << val << "" << oendl;
114 keys = QStringList::split( "SEPARATOR", key ); 114 keys = QStringList::split( "SEPARATOR", key );
115 //qDebug("group >%s< key >%s< val %i", keys[0].latin1(), keys[1].latin1(), val ); 115 //odebug << "group >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< val " << val << "" << oendl;
116 cfg.setGroup(keys[0]); 116 cfg.setGroup(keys[0]);
117 cfg.writeEntry(keys[1], val); 117 cfg.writeEntry(keys[1], val);
118 } 118 }
@@ -121,7 +121,7 @@ void PPPData::save()
121 QStringList val = it.data(); 121 QStringList val = it.data();
122 key = it.key(); 122 key = it.key();
123 QChar sep = sepEntries[key]; 123 QChar sep = sepEntries[key];
124// qDebug("saving %s -> %s", key.latin1(), val.join(sep).latin1() ); 124// odebug << "saving " << key.latin1() << " -> " << val.join(sep).latin1() << "" << oendl;
125 keys = QStringList::split( "SEPARATOR", key ); 125 keys = QStringList::split( "SEPARATOR", key );
126 cfg.setGroup(keys[0]); 126 cfg.setGroup(keys[0]);
127 cfg.writeEntry(keys[1], val, sep); 127 cfg.writeEntry(keys[1], val, sep);
@@ -142,7 +142,7 @@ void PPPData::cancel() {
142QString PPPData::readConfig(const QString &group, const QString &key, 142QString PPPData::readConfig(const QString &group, const QString &key,
143 const QString &defvalue = "") 143 const QString &defvalue = "")
144{ 144{
145// qDebug("PPPData::readConfig key >%s< group >%s<",key.latin1(), group.latin1()); 145// odebug << "PPPData::readConfig key >" << key.latin1() << "< group >" << group.latin1() << "<" << oendl;
146 QString idx = SEP.arg(group).arg(key); 146 QString idx = SEP.arg(group).arg(key);
147 if (stringEntries.find(idx) != stringEntries.end()) 147 if (stringEntries.find(idx) != stringEntries.end())
148 return stringEntries[idx]; 148 return stringEntries[idx];
@@ -365,21 +365,21 @@ const QString PPPData::modemDevice() {
365// } 365// }
366 366
367// bool PPPData::setModemName(const QString &n) { 367// bool PPPData::setModemName(const QString &n) {
368// qDebug("Setting modem name to >%s<", n.latin1()); 368// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl;
369// _modemName = n; 369// _modemName = n;
370// writeConfig(cgroup, MODEMNAME_KEY, n); 370// writeConfig(cgroup, MODEMNAME_KEY, n);
371// return true; //FIXME 371// return true; //FIXME
372// } 372// }
373 373
374// bool PPPData::changeModemName(const QString &n) { 374// bool PPPData::changeModemName(const QString &n) {
375// qDebug("Setting modem name to >%s<", n.latin1()); 375// odebug << "Setting modem name to >" << n.latin1() << "<" << oendl;
376// _modemName = n; 376// _modemName = n;
377// writeConfig(modemGroup(), MODEMNAME_KEY, n); 377// writeConfig(modemGroup(), MODEMNAME_KEY, n);
378// return true; //FIXME 378// return true; //FIXME
379// } 379// }
380 380
381bool PPPData::setModemDevice(const QString &n) { 381bool PPPData::setModemDevice(const QString &n) {
382 qDebug("Setting modem dev to >%s<", n.latin1()); 382 odebug << "Setting modem dev to >" << n.latin1() << "<" << oendl;
383 writeConfig(modemGroup(), MODEMDEV_KEY, n); 383 writeConfig(modemGroup(), MODEMDEV_KEY, n);
384 return true; //FIXME 384 return true; //FIXME
385} 385}
@@ -739,18 +739,18 @@ int PPPData::count() const {
739 739
740 740
741bool PPPData::setAccount(const QString &aname) { 741bool PPPData::setAccount(const QString &aname) {
742 qDebug("setting account to >%s<", aname.latin1()); 742 odebug << "setting account to >" << aname.latin1() << "<" << oendl;
743 for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { 743 for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) {
744 cgroup = *it; 744 cgroup = *it;
745 qDebug("PPPData::setAccount %s", cgroup.latin1()); 745 odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl;
746 qDebug( "iterator %s", (*it).latin1() ); 746 odebug << "iterator " << (*it).latin1() << "" << oendl;
747 if(accname() == aname) { 747 if(accname() == aname) {
748 qDebug("SUCCESS"); 748 odebug << "SUCCESS" << oendl;
749 return true; 749 return true;
750 } 750 }
751 751
752 } 752 }
753 qDebug("FAILURE"); 753 odebug << "FAILURE" << oendl;
754 return false; 754 return false;
755} 755}
756 756
@@ -772,11 +772,11 @@ bool PPPData::isUniqueAccname(const QString &n) {
772 QString save_cgroup = cgroup; 772 QString save_cgroup = cgroup;
773 for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) { 773 for ( QStringList::Iterator it = accountList.begin(); it != accountList.end(); ++it ) {
774 cgroup = *it; 774 cgroup = *it;
775 qDebug("PPPData::setAccount %s", cgroup.latin1()); 775 odebug << "PPPData::setAccount " << cgroup.latin1() << "" << oendl;
776 qDebug( "%s \n", (*it).latin1() ); 776 odebug << "" << (*it).latin1() << " \n" << oendl;
777 if(accname() == n && cgroup != save_cgroup) { 777 if(accname() == n && cgroup != save_cgroup) {
778 cgroup = save_cgroup; 778 cgroup = save_cgroup;
779 qDebug("SUCCESS"); 779 odebug << "SUCCESS" << oendl;
780 return false; 780 return false;
781 } 781 }
782 782
@@ -788,13 +788,13 @@ bool PPPData::isUniqueAccname(const QString &n) {
788 788
789bool PPPData::isUniqueDevname(const QString &n) { 789bool PPPData::isUniqueDevname(const QString &n) {
790 QString save_mName = _modemName; 790 QString save_mName = _modemName;
791 qDebug("PPPData::isUniqueDevname checking if %s is unique", n.latin1()); 791 odebug << "PPPData::isUniqueDevname checking if " << n.latin1() << " is unique" << oendl;
792 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { 792 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) {
793 _modemName = *it; 793 _modemName = *it;
794 qDebug("PPPData::isUniqueDevname %s == %s", n.latin1() , devname().latin1()); 794 odebug << "PPPData::isUniqueDevname " << n.latin1() << " == " << devname().latin1() << "" << oendl;
795 if(devname() == n && _modemName != save_mName) { 795 if(devname() == n && _modemName != save_mName) {
796 _modemName = save_mName; 796 _modemName = save_mName;
797 qDebug("NOT UNIQUE"); 797 odebug << "NOT UNIQUE" << oendl;
798 return false; 798 return false;
799 } 799 }
800 800
@@ -820,7 +820,7 @@ bool PPPData::deleteAccount() {
820 keys = QStringList::split( "SEPARATOR", key ); 820 keys = QStringList::split( "SEPARATOR", key );
821 if(keys[0]==cgroup){ 821 if(keys[0]==cgroup){
822 stringEntries.remove( it ); 822 stringEntries.remove( it );
823 qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); 823 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl;
824 } 824 }
825 } 825 }
826 for( QMap<QString,int>::Iterator it = intEntries.begin(); 826 for( QMap<QString,int>::Iterator it = intEntries.begin();
@@ -830,7 +830,7 @@ bool PPPData::deleteAccount() {
830 keys = QStringList::split( "SEPARATOR", key ); 830 keys = QStringList::split( "SEPARATOR", key );
831 if(keys[0]==cgroup){ 831 if(keys[0]==cgroup){
832 intEntries.remove( it ); 832 intEntries.remove( it );
833 qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); 833 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl;
834 } 834 }
835 } 835 }
836 for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); 836 for( QMap<QString,QStringList>::Iterator it = listEntries.begin();
@@ -840,7 +840,7 @@ bool PPPData::deleteAccount() {
840 if(keys[0]==cgroup){ 840 if(keys[0]==cgroup){
841 listEntries.remove( it ); 841 listEntries.remove( it );
842 sepEntries.remove( key ); 842 sepEntries.remove( key );
843 qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); 843 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl;
844 } 844 }
845 } 845 }
846 846
@@ -860,7 +860,7 @@ bool PPPData::deleteAccount(const QString &aname) {
860 860
861int PPPData::newaccount() { 861int PPPData::newaccount() {
862 862
863 qDebug("PPPData::newaccount highcount %i/%i",highcount,MAX_ACCOUNTS); 863 odebug << "PPPData::newaccount highcount " << highcount << "/" << MAX_ACCOUNTS << "" << oendl;
864// if(!config) open(); 864// if(!config) open();
865// if (highcount >= MAX_ACCOUNTS) return -1; 865// if (highcount >= MAX_ACCOUNTS) return -1;
866 866
@@ -869,7 +869,7 @@ int PPPData::newaccount() {
869 tmp.sprintf("%s%i", ACCOUNT_GRP, ++highcount); 869 tmp.sprintf("%s%i", ACCOUNT_GRP, ++highcount);
870 cgroup = QString(tmp); 870 cgroup = QString(tmp);
871 accountList << tmp; 871 accountList << tmp;
872 qDebug("PPPData::newaccount() Group: >%s<",cgroup.latin1()); 872 odebug << "PPPData::newaccount() Group: >" << cgroup.latin1() << "<" << oendl;
873 setpppdArgumentDefaults(); 873 setpppdArgumentDefaults();
874 return highcount; 874 return highcount;
875} 875}
@@ -965,9 +965,9 @@ void PPPData::setStoredUsername(const QString &b) {
965 965
966 966
967const QString PPPData::storedPassword() { 967const QString PPPData::storedPassword() {
968 qDebug("getting stored pw"); 968 odebug << "getting stored pw" << oendl;
969 qDebug("g %s", cgroup.latin1() ); 969 odebug << "g " << cgroup.latin1() << "" << oendl;
970 qDebug("k %s", STORED_PASSWORD_KEY); 970 odebug << "k " << STORED_PASSWORD_KEY << "" << oendl;
971 return readConfig(cgroup, STORED_PASSWORD_KEY, ""); 971 return readConfig(cgroup, STORED_PASSWORD_KEY, "");
972} 972}
973 973
@@ -1329,10 +1329,10 @@ void PPPData::setConfiguredInterfaces( QMap<QString,QString> ifaces )
1329 cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++)); 1329 cfg.setGroup(QString("%1_%1").arg(ACCLIST_GRP).arg(i++));
1330 cfg.writeEntry( ACOUNTS_DEV, it.key() ); 1330 cfg.writeEntry( ACOUNTS_DEV, it.key() );
1331 cfg.writeEntry( ACOUNTS_ACC, it.data() ); 1331 cfg.writeEntry( ACOUNTS_ACC, it.data() );
1332 qDebug("I %i",i); 1332 odebug << "I " << i << "" << oendl;
1333 } 1333 }
1334 cfg.setGroup( ACCLIST_GRP ); 1334 cfg.setGroup( ACCLIST_GRP );
1335 qDebug("saved %i account settings", i); 1335 odebug << "saved " << i << " account settings" << oendl;
1336 cfg.writeEntry( ACCOUNTS_COUNT, i ); 1336 cfg.writeEntry( ACCOUNTS_COUNT, i );
1337 1337
1338} 1338}
@@ -1372,7 +1372,7 @@ QStringList PPPData::getAccountList()
1372const QString PPPData::devname() 1372const QString PPPData::devname()
1373{ 1373{
1374 QString tmp = readConfig(modemGroup(), MODEMNAME_KEY ); 1374 QString tmp = readConfig(modemGroup(), MODEMNAME_KEY );
1375 qDebug("PPPData::devname() of %s is %s", modemGroup().latin1(), tmp.latin1()); 1375 odebug << "PPPData::devname() of " << modemGroup().latin1() << " is " << tmp.latin1() << "" << oendl;
1376 return tmp; 1376 return tmp;
1377} 1377}
1378 1378
@@ -1390,20 +1390,20 @@ void PPPData::setDevname(const QString &n) {
1390 1390
1391bool PPPData::setDevice(const QString &dev ) 1391bool PPPData::setDevice(const QString &dev )
1392{ 1392{
1393 qDebug("setting device to >%s<", dev.latin1()); 1393 odebug << "setting device to >" << dev.latin1() << "<" << oendl;
1394 QString save_mName = _modemName; 1394 QString save_mName = _modemName;
1395 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { 1395 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) {
1396 _modemName = *it; 1396 _modemName = *it;
1397 qDebug("PPPData::setDevice %s is named %s", _modemName.latin1(), devname().latin1() ); 1397 odebug << "PPPData::setDevice " << _modemName.latin1() << " is named " << devname().latin1() << "" << oendl;
1398 qDebug( "iterator %s", (*it).latin1() ); 1398 odebug << "iterator " << (*it).latin1() << "" << oendl;
1399 if(devname() == dev) { 1399 if(devname() == dev) {
1400 qDebug("SUCCESS"); 1400 odebug << "SUCCESS" << oendl;
1401 return true; 1401 return true;
1402 } 1402 }
1403 1403
1404 } 1404 }
1405 _modemName = save_mName; 1405 _modemName = save_mName;
1406 qDebug("FAILURE"); 1406 odebug << "FAILURE" << oendl;
1407 return false; 1407 return false;
1408} 1408}
1409 1409
@@ -1424,7 +1424,7 @@ bool PPPData::deleteDevice()
1424 keys = QStringList::split( "SEPARATOR", key ); 1424 keys = QStringList::split( "SEPARATOR", key );
1425 if(keys[0]==modemGroup()){ 1425 if(keys[0]==modemGroup()){
1426 stringEntries.remove( it ); 1426 stringEntries.remove( it );
1427 qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.latin1() ); 1427 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.latin1() << "<" << oendl;
1428 } 1428 }
1429 } 1429 }
1430 for( QMap<QString,int>::Iterator it = intEntries.begin(); 1430 for( QMap<QString,int>::Iterator it = intEntries.begin();
@@ -1434,7 +1434,7 @@ bool PPPData::deleteDevice()
1434 keys = QStringList::split( "SEPARATOR", key ); 1434 keys = QStringList::split( "SEPARATOR", key );
1435 if(keys[0]==modemGroup()){ 1435 if(keys[0]==modemGroup()){
1436 intEntries.remove( it ); 1436 intEntries.remove( it );
1437 qDebug("deleting >%s< key >%s< value >%i<", keys[0].latin1(), keys[1].latin1(), val ); 1437 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val << "<" << oendl;
1438 } 1438 }
1439 } 1439 }
1440 for( QMap<QString,QStringList>::Iterator it = listEntries.begin(); 1440 for( QMap<QString,QStringList>::Iterator it = listEntries.begin();
@@ -1444,7 +1444,7 @@ bool PPPData::deleteDevice()
1444 if(keys[0]==modemGroup()){ 1444 if(keys[0]==modemGroup()){
1445 listEntries.remove( it ); 1445 listEntries.remove( it );
1446 sepEntries.remove( key ); 1446 sepEntries.remove( key );
1447 qDebug("deleting >%s< key >%s< value >%s<", keys[0].latin1(), keys[1].latin1(), val.join("").latin1() ); 1447 odebug << "deleting >" << keys[0].latin1() << "< key >" << keys[1].latin1() << "< value >" << val.join("").latin1() << "<" << oendl;
1448 } 1448 }
1449 } 1449 }
1450 1450
@@ -1463,14 +1463,14 @@ bool PPPData::deleteDevice(const QString &dev)
1463int PPPData::newdevice() 1463int PPPData::newdevice()
1464{ 1464{
1465 1465
1466 qDebug("PPPData::newdevice highcount %i",highcountdev); 1466 odebug << "PPPData::newdevice highcount " << highcountdev << "" << oendl;
1467 1467
1468 1468
1469 QString tmp; 1469 QString tmp;
1470 tmp.sprintf("%s%i", MODEM_GRP, ++highcountdev); 1470 tmp.sprintf("%s%i", MODEM_GRP, ++highcountdev);
1471 _modemName = QString(tmp); 1471 _modemName = QString(tmp);
1472 deviceList << tmp; 1472 deviceList << tmp;
1473 qDebug("PPPData::newdevice() Group: >%s<",cgroup.latin1()); 1473 odebug << "PPPData::newdevice() Group: >" << cgroup.latin1() << "<" << oendl;
1474 return highcountdev; 1474 return highcountdev;
1475} 1475}
1476 1476
@@ -1484,10 +1484,10 @@ QStringList PPPData::getDevicesNamesList()
1484{ 1484{
1485 QStringList list; 1485 QStringList list;
1486 QString save_mName = _modemName; 1486 QString save_mName = _modemName;
1487 qDebug("PPPData::getDevicesNamesList has %s", deviceList.join("---").latin1()); 1487 odebug << "PPPData::getDevicesNamesList has " << deviceList.join("---").latin1() << "" << oendl;
1488 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) { 1488 for ( QStringList::Iterator it = deviceList.begin(); it != deviceList.end(); ++it ) {
1489 _modemName = *it; 1489 _modemName = *it;
1490 qDebug("PPPData::getDevicesNamesList adding %s as %s",_modemName.latin1(), devname().latin1()); 1490 odebug << "PPPData::getDevicesNamesList adding " << _modemName.latin1() << " as " << devname().latin1() << "" << oendl;
1491 list << devname(); 1491 list << devname();
1492 } 1492 }
1493 _modemName = save_mName; 1493 _modemName = save_mName;
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index a7caffe..2291e8a 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -60,10 +60,10 @@ PPPModule::PPPModule() : Module()
60 QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces(); 60 QMap<QString,QString> ifaces = PPPData::getConfiguredInterfaces();
61 QMap<QString,QString>::Iterator it; 61 QMap<QString,QString>::Iterator it;
62 InterfacePPP *iface; 62 InterfacePPP *iface;
63 qDebug("getting interfaces"); 63 odebug << "getting interfaces" << oendl;
64 for( it = ifaces.begin(); it != ifaces.end(); ++it ) 64 for( it = ifaces.begin(); it != ifaces.end(); ++it )
65 { 65 {
66 qDebug("ifaces %s %s", it.key().latin1(), it.data().latin1() ); 66 odebug << "ifaces " << it.key().latin1() << " " << it.data().latin1() << "" << oendl;
67 iface = new InterfacePPP( 0, it.key() ); 67 iface = new InterfacePPP( 0, it.key() );
68 iface->setHardwareName( it.data() ); 68 iface->setHardwareName( it.data() );
69 list.append( (Interface*)iface ); 69 list.append( (Interface*)iface );
@@ -71,7 +71,7 @@ PPPModule::PPPModule() : Module()
71 // check if (*it) is one of the running ifaces 71 // check if (*it) is one of the running ifaces
72 if ( running.contains( it.data() ) ) 72 if ( running.contains( it.data() ) )
73 { 73 {
74 qDebug("iface is running %s", it.key().latin1() ); 74 odebug << "iface is running " << it.key().latin1() << "" << oendl;
75 handledInterfaceNames << running[it.data()].device; 75 handledInterfaceNames << running[it.data()].device;
76 iface->setStatus( true ); 76 iface->setStatus( true );
77 iface->setPPPDpid( running[it.data()].pid ); 77 iface->setPPPDpid( running[it.data()].pid );
@@ -88,7 +88,7 @@ PPPModule::PPPModule() : Module()
88 */ 88 */
89PPPModule::~PPPModule() 89PPPModule::~PPPModule()
90{ 90{
91 qDebug("PPPModule::~PPPModule() " ); 91 odebug << "PPPModule::~PPPModule() " << oendl;
92 QMap<QString,QString> ifaces; 92 QMap<QString,QString> ifaces;
93 InterfaceKeeper keeper; 93 InterfaceKeeper keeper;
94 Interface *i; 94 Interface *i;
@@ -97,7 +97,7 @@ PPPModule::~PPPModule()
97 /* if online save the state */ 97 /* if online save the state */
98 if ( i->getStatus() ) 98 if ( i->getStatus() )
99 { 99 {
100 qDebug("Iface %s is still up", i->getHardwareName().latin1() ); 100 odebug << "Iface " << i->getHardwareName().latin1() << " is still up" << oendl;
101 InterfacePPP* ppp = static_cast<InterfacePPP*>(i); 101 InterfacePPP* ppp = static_cast<InterfacePPP*>(i);
102 keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() ); 102 keeper.addInterface( ppp->pppPID(), ppp->pppDev(), ppp->getHardwareName() );
103 } 103 }
@@ -141,7 +141,7 @@ bool PPPModule::isOwner(Interface *i)
141 */ 141 */
142QWidget *PPPModule::configure(Interface *i) 142QWidget *PPPModule::configure(Interface *i)
143{ 143{
144 qDebug("return ModemWidget"); 144 odebug << "return ModemWidget" << oendl;
145 PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, 145 PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i,
146 0, "PPPConfig", false, 146 0, "PPPConfig", false,
147 (Qt::WDestructiveClose | Qt::WStyle_ContextHelp)); 147 (Qt::WDestructiveClose | Qt::WStyle_ContextHelp));
@@ -168,7 +168,7 @@ QWidget *PPPModule::information(Interface *i)
168QList<Interface> PPPModule::getInterfaces() 168QList<Interface> PPPModule::getInterfaces()
169{ 169{
170 // List all of the files in the peer directory 170 // List all of the files in the peer directory
171 qDebug("PPPModule::getInterfaces"); 171 odebug << "PPPModule::getInterfaces" << oendl;
172 return list; 172 return list;
173} 173}
174 174
@@ -261,7 +261,7 @@ namespace
261 con.name = (*it); 261 con.name = (*it);
262 con.pid = cfg.readNumEntry("pid"); 262 con.pid = cfg.readNumEntry("pid");
263 con.device = cfg.readEntry("device"); 263 con.device = cfg.readEntry("device");
264 qDebug(" %s %s %d", con.name.latin1(), con.device.latin1(), con.pid ); 264 odebug << " " << con.name.latin1() << " " << con.device.latin1() << " " << con.pid << "" << oendl;
265 265
266 if ( con.pid != -1 && isAvailable( con.pid ) ) 266 if ( con.pid != -1 && isAvailable( con.pid ) )
267 ifaces.insert( con.name, con ); 267 ifaces.insert( con.name, con );
@@ -272,11 +272,11 @@ namespace
272 { 272 {
273 if (::kill(p, 0 ) == 0 || errno != ESRCH ) 273 if (::kill(p, 0 ) == 0 || errno != ESRCH )
274 { 274 {
275 qDebug("isAvailable %d", p); 275 odebug << "isAvailable " << p << "" << oendl;
276 return true; 276 return true;
277 } 277 }
278 278
279 qDebug("notAvailable %d", p); 279 odebug << "notAvailable " << p << "" << oendl;
280 return false; 280 return false;
281 } 281 }
282 282
diff --git a/noncore/settings/networksettings/wlan/infoimp.cpp b/noncore/settings/networksettings/wlan/infoimp.cpp
index bd56678..c558f5e 100644
--- a/noncore/settings/networksettings/wlan/infoimp.cpp
+++ b/noncore/settings/networksettings/wlan/infoimp.cpp
@@ -13,7 +13,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
13 WExtensions *wExtensions = new WExtensions(name); 13 WExtensions *wExtensions = new WExtensions(name);
14 if(!wExtensions->doesHaveWirelessExtensions()){ 14 if(!wExtensions->doesHaveWirelessExtensions()){
15 delete wExtensions; 15 delete wExtensions;
16 qDebug("WlanInfoImp::No wireless extension"); 16 odebug << "WlanInfoImp::No wireless extension" << oendl;
17 return; 17 return;
18 } 18 }
19 delete wExtensions; 19 delete wExtensions;
@@ -28,7 +28,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
28void WlanInfoImp::update(){ 28void WlanInfoImp::update(){
29 WExtensions *wExtensions = new WExtensions(this->name()); 29 WExtensions *wExtensions = new WExtensions(this->name());
30 if(!wExtensions->doesHaveWirelessExtensions()){ 30 if(!wExtensions->doesHaveWirelessExtensions()){
31 qDebug("No extension"); 31 odebug << "No extension" << oendl;
32 delete wExtensions; 32 delete wExtensions;
33 timer->stop(); 33 timer->stop();
34 return; 34 return;
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp
index d1fff88..9c64323 100644
--- a/noncore/settings/networksettings/wlan/wextensions.cpp
+++ b/noncore/settings/networksettings/wlan/wextensions.cpp
@@ -112,7 +112,7 @@ int WExtensions::channel(){
112 left += 0.005; 112 left += 0.005;
113 right += 0.005; 113 right += 0.005;
114 } 114 }
115 qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); 115 odebug << QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1() << oendl;
116 return -1; 116 return -1;
117} 117}
118 118
@@ -177,12 +177,12 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
177 wstream >> name >> status >> quality >> c >> signal >> c >> noise; 177 wstream >> name >> status >> quality >> c >> signal >> c >> noise;
178 if(name == QString("%1:").arg(interface)){ 178 if(name == QString("%1:").arg(interface)){
179 if ( quality > 92 ) 179 if ( quality > 92 )
180 qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); 180 odebug << "WIFIAPPLET: D'oh! Quality " << quality << " > estimated max!\n" << oendl;
181 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) 181 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) )
182 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); 182 odebug << "WIFIAPPLET: Doh! Strength " << signal << " > estimated max!\n" << oendl;
183 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) 183 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
184 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); 184 odebug << "WIFIAPPLET: Doh! Noise " << noise << " > estimated max!\n" << oendl;
185 //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); 185 //odebug << QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1() << oendl;
186 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; 186 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
187 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; 187 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
188 quality = ( quality*100 ) / 92; 188 quality = ( quality*100 ) / 92;
@@ -190,7 +190,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
190 } 190 }
191 } 191 }
192 192
193 qDebug("WExtensions::statsCard no longer present."); 193 odebug << "WExtensions::statsCard no longer present." << oendl;
194 quality = -1; 194 quality = -1;
195 signal = IW_LOWER; 195 signal = IW_LOWER;
196 noise = IW_LOWER; 196 noise = IW_LOWER;
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index 80a9927..fe7941d 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -45,7 +45,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
45 parseSettingFile(); 45 parseSettingFile();
46 } 46 }
47 else 47 else
48 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); 48 odebug << QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1() << oendl;
49 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); 49 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
50} 50}
51 51
@@ -146,7 +146,7 @@ void WLANImp::changeAndSaveSettingFile(){
146 QFile file(wlanFile); 146 QFile file(wlanFile);
147 147
148 if (!file.open(IO_ReadWrite)){ 148 if (!file.open(IO_ReadWrite)){
149 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); 149 odebug << QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1() << oendl;
150 return; 150 return;
151 } 151 }
152 152
@@ -236,7 +236,7 @@ void WLANImp::accept(){
236 insert << "cardctl eject && cardctl insert"; 236 insert << "cardctl eject && cardctl insert";
237 237
238 if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) { 238 if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) {
239 qWarning("could not start cardctl"); 239 owarn << "could not start cardctl" << oendl;
240 } 240 }
241 241
242 // Close out the dialog 242 // Close out the dialog
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index eeebe7f..e483efe 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -52,7 +52,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
52 // Check sanity - the existance of the wireless-tools if-pre-up script 52 // Check sanity - the existance of the wireless-tools if-pre-up script
53 QFile file(QString(PREUP)); 53 QFile file(QString(PREUP));
54 if (file.exists()) { 54 if (file.exists()) {
55 qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); 55 owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl;
56 } 56 }
57 57
58 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); 58 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) );
@@ -233,7 +233,7 @@ void WLANImp::writeOpts() {
233 } 233 }
234 bool error = false; 234 bool error = false;
235 235
236 qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); 236 odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl;
237 237
238 if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); 238 if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!");
239 239
@@ -307,7 +307,7 @@ void WLANImp::writeOpts() {
307void WLANImp::rescanNeighbourhood() 307void WLANImp::rescanNeighbourhood()
308{ 308{
309 QString name = interface->getInterfaceName(); 309 QString name = interface->getInterfaceName();
310 qDebug( "rescanNeighbourhood via '%s'", (const char*) name ); 310 odebug << "rescanNeighbourhood via '" << (const char*) name << "'" << oendl;
311 311
312 OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) ); 312 OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) );
313 assert( wiface ); 313 assert( wiface );
@@ -330,12 +330,12 @@ void WLANImp::rescanNeighbourhood()
330 } 330 }
331 if ( devicetype.isEmpty() ) 331 if ( devicetype.isEmpty() )
332 { 332 {
333 qWarning( "rescanNeighbourhood(): couldn't guess device type :(" ); 333 owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl;
334 return; 334 return;
335 } 335 }
336 else 336 else
337 { 337 {
338 qDebug( "rescanNeighbourhood(): device type seems to be '%s'", (const char*) devicetype ); 338 odebug << "rescanNeighbourhood(): device type seems to be '" << (const char*) devicetype << "'" << oendl;
339 } 339 }
340 340
341 // configure interface to receive 802.11 management frames 341 // configure interface to receive 802.11 management frames
@@ -349,14 +349,14 @@ void WLANImp::rescanNeighbourhood()
349 else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) ); 349 else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) );
350 else 350 else
351 { 351 {
352 qDebug( "rescanNeighbourhood(): unsupported device type for monitoring :(" ); 352 odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl;
353 return; 353 return;
354 } 354 }
355 355
356 wiface->setMode( "monitor" ); 356 wiface->setMode( "monitor" );
357 if ( wiface->mode() != "monitor" ) 357 if ( wiface->mode() != "monitor" )
358 { 358 {
359 qWarning( "rescanNeighbourhood(): Unable to bring device into monitor mode (%s).", strerror( errno ) ); 359 owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl;
360 return; 360 return;
361 } 361 }
362 362
@@ -365,7 +365,7 @@ void WLANImp::rescanNeighbourhood()
365 cap->open( name ); 365 cap->open( name );
366 if ( !cap->isOpen() ) 366 if ( !cap->isOpen() )
367 { 367 {
368 qWarning( "rescanNeighbourhood(): Unable to open libpcap (%s).", strerror( errno ) ); 368 owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl;
369 return; 369 return;
370 } 370 }
371 371
@@ -398,15 +398,15 @@ void WLANImp::rescanNeighbourhood()
398 wiface->setChannel( i ); 398 wiface->setChannel( i );
399 pb->setProgress( i ); 399 pb->setProgress( i );
400 qApp->processEvents(); 400 qApp->processEvents();
401 qDebug( "rescanNeighbourhood(): listening on channel %d...", i ); 401 odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl;
402 OPacket* p = cap->next( 1000 ); 402 OPacket* p = cap->next( 1000 );
403 if ( !p ) 403 if ( !p )
404 { 404 {
405 qDebug( "rescanNeighbourhood(): nothing received on channel %d", i ); 405 odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl;
406 } 406 }
407 else 407 else
408 { 408 {
409 qDebug( "rescanNeighbourhood(): TADAA - something came in on channel %d", i ); 409 odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl;
410 handlePacket( p ); 410 handlePacket( p );
411 } 411 }
412 } 412 }
@@ -439,7 +439,7 @@ void WLANImp::handlePacket( OPacket* p )
439 } 439 }
440 else 440 else
441 { 441 {
442 qWarning( "handlePacket(): invalid frame [possibly noise] detected!" ); 442 owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
443 return; 443 return;
444 } 444 }
445 445
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 74d7f8e..886af10 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -122,13 +122,13 @@ bool WLANModule::remove(Interface*){
122 122
123void WLANModule::receive(const QCString &param, const QByteArray &arg) 123void WLANModule::receive(const QCString &param, const QByteArray &arg)
124{ 124{
125 qDebug("WLANModule::receive "+param); 125 odebug << "WLANModule::receive "+param << oendl;
126 QStringList params = QStringList::split(",",param); 126 QStringList params = QStringList::split(",",param);
127 int count = params.count(); 127 int count = params.count();
128 qDebug("WLANModule got %i params", count ); 128 odebug << "WLANModule got " << count << " params" << oendl;
129 if (count < 2){ 129 if (count < 2){
130 qDebug("Erorr less than 2 parameter"); 130 odebug << "Erorr less than 2 parameter" << oendl;
131 qDebug("RETURNING"); 131 odebug << "RETURNING" << oendl;
132 return; 132 return;
133 } 133 }
134 134
@@ -137,38 +137,38 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
137 QString action; 137 QString action;
138 int countMsgs = 0; 138 int countMsgs = 0;
139 stream >> interface; 139 stream >> interface;
140 qDebug("got count? >%s<",interface.latin1()); 140 odebug << "got count? >" << interface.latin1() << "<" << oendl;
141 if (interface == "count"){ 141 if (interface == "count"){
142 qDebug("got count"); 142 odebug << "got count" << oendl;
143 stream >> action; 143 stream >> action;
144 qDebug("Got count num >%s<", action.latin1()); 144 odebug << "Got count num >" << action.latin1() << "<" << oendl;
145 countMsgs = action.toInt(); 145 countMsgs = action.toInt();
146 } 146 }
147 147
148 QDialog *toShow; 148 QDialog *toShow;
149 //while (! stream.atEnd() ){ 149 //while (! stream.atEnd() ){
150 for (int i = 0; i < countMsgs; i++){ 150 for (int i = 0; i < countMsgs; i++){
151 qDebug("start stream %d/%d",i,countMsgs); 151 odebug << "start stream " << i << "/" << countMsgs << "" << oendl;
152 if (stream.atEnd()){ 152 if (stream.atEnd()){
153 qDebug("end of stream"); 153 odebug << "end of stream" << oendl;
154 return; 154 return;
155 } 155 }
156 stream >> interface; 156 stream >> interface;
157 qDebug("got iface"); 157 odebug << "got iface" << oendl;
158 stream >> action; 158 stream >> action;
159 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); 159 odebug << "WLANModule got interface " << interface.latin1() << " and acion " << action.latin1() << "" << oendl;
160 // find interfaces 160 // find interfaces
161 Interface *ifa=0; 161 Interface *ifa=0;
162 for ( Interface *i=list.first(); i != 0; i=list.next() ){ 162 for ( Interface *i=list.first(); i != 0; i=list.next() ){
163 if (i->getInterfaceName() == interface){ 163 if (i->getInterfaceName() == interface){
164 qDebug("WLANModule found interface %s",interface.latin1()); 164 odebug << "WLANModule found interface " << interface.latin1() << "" << oendl;
165 ifa = i; 165 ifa = i;
166 } 166 }
167 } 167 }
168 168
169 if (ifa == 0){ 169 if (ifa == 0){
170 qDebug("WLANModule Did not find %s",interface.latin1()); 170 odebug << "WLANModule Did not find " << interface.latin1() << "" << oendl;
171 qDebug("skipping"); 171 odebug << "skipping" << oendl;
172 count = 0; 172 count = 0;
173 } 173 }
174 174
@@ -195,9 +195,9 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
195 } 195 }
196 QPEApplication::showWidget( wlanconfigWiget ); 196 QPEApplication::showWidget( wlanconfigWiget );
197 stream >> value; 197 stream >> value;
198 qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); 198 odebug << "WLANModule (build 4) is setting " << action.latin1() << " of " << interface.latin1() << " to " << value.latin1() << "" << oendl;
199 if (value.isEmpty()){ 199 if (value.isEmpty()){
200 qDebug("value is empty!!!\nreturning"); 200 odebug << "value is empty!!!\nreturning" << oendl;
201 return; 201 return;
202 } 202 }
203 if ( action.contains("ESSID") ){ 203 if ( action.contains("ESSID") ){
@@ -218,10 +218,10 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
218 218
219 }else if (action.contains("Channel")){ 219 }else if (action.contains("Channel")){
220 bool ok; 220 bool ok;
221 qDebug("converting channel"); 221 odebug << "converting channel" << oendl;
222 int chan = value.toInt( &ok ); 222 int chan = value.toInt( &ok );
223 if (ok){ 223 if (ok){
224 qDebug("ok setting channel"); 224 odebug << "ok setting channel" << oendl;
225 wlanconfigWiget->specifyChan->setChecked( true ); 225 wlanconfigWiget->specifyChan->setChecked( true );
226 wlanconfigWiget->networkChannel->setValue( chan ); 226 wlanconfigWiget->networkChannel->setValue( chan );
227 } 227 }
@@ -229,27 +229,27 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
229 wlanconfigWiget->specifyAp->setChecked( true ); 229 wlanconfigWiget->specifyAp->setChecked( true );
230 wlanconfigWiget->macEdit->setText( value ); 230 wlanconfigWiget->macEdit->setText( value );
231 }else 231 }else
232 qDebug("wlan plugin has no clue"); 232 odebug << "wlan plugin has no clue" << oendl;
233 } 233 }
234 qDebug("next stream"); 234 odebug << "next stream" << oendl;
235 }// while stream 235 }// while stream
236 qDebug("end of stream"); 236 odebug << "end of stream" << oendl;
237 if (toShow) toShow->exec(); 237 if (toShow) toShow->exec();
238 qDebug("returning"); 238 odebug << "returning" << oendl;
239} 239}
240 240
241QWidget *WLANModule::getInfo( Interface *i) 241QWidget *WLANModule::getInfo( Interface *i)
242{ 242{
243 qDebug("WLANModule::getInfo start"); 243 odebug << "WLANModule::getInfo start" << oendl;
244 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); 244 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose);
245 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); 245 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
246 info->tabWidget->insertTab(information, "TCP/IP", 0); 246 info->tabWidget->insertTab(information, "TCP/IP", 0);
247 info->tabWidget->setCurrentPage( 0 ); 247 info->tabWidget->setCurrentPage( 0 );
248 info->tabWidget->showPage( information ); 248 info->tabWidget->showPage( information );
249 if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); 249 if (info->tabWidget->currentPage() == information ) odebug << "infotab OK" << oendl;
250 else qDebug("infotab NOT OK"); 250 else odebug << "infotab NOT OK" << oendl;
251 qDebug("current idx %d", info->tabWidget->currentPageIndex()); 251 odebug << "current idx " << info->tabWidget->currentPageIndex() << "" << oendl;
252 qDebug("WLANModule::getInfo return"); 252 odebug << "WLANModule::getInfo return" << oendl;
253 return info; 253 return info;
254} 254}
255 255