summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/kpppwidget.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/kpppwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp20
1 files changed, 10 insertions, 10 deletions
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
@@ -71,19 +71,19 @@ KPPPWidget::KPPPWidget(PPPData*pd, Interface *i, QWidget *parent, const char *na
71{ 71{
72// tabWindow = 0; 72// tabWindow = 0;
73 p_kppp = this; 73 p_kppp = this;
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)
87 exit(4); 87 exit(4);
88 88
89// installEventFilter(this); 89// installEventFilter(this);
@@ -302,13 +302,13 @@ KPPPWidget::~KPPPWidget()
302} 302}
303 303
304// bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { 304// bool KPPPWidget::eventFilter(QObject *o, QEvent *e) {
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:
312// sigChld(); 312// sigChld();
313// break; 313// break;
314// case SIGUSR1: 314// case SIGUSR1:
@@ -420,32 +420,32 @@ void KPPPWidget::interruptConnection() {
420 if (_pppdata->pppdRunning()) 420 if (_pppdata->pppdRunning())
421 emit disconnect(); 421 emit disconnect();
422} 422}
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
436 // enter this block 436 // enter this block
437 437
438 // just to be sure 438 // just to be sure
439 439
440 Modem::modem->removeSecret(AUTH_PAP); 440 Modem::modem->removeSecret(AUTH_PAP);
441 Modem::modem->removeSecret(AUTH_CHAP); 441 Modem::modem->removeSecret(AUTH_CHAP);
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
449// stopAccounting(); 449// stopAccounting();
450 450
451 con_win->stopClock(); 451 con_win->stopClock();
@@ -486,13 +486,13 @@ void KPPPWidget::sigPPPDDied() {
486 } 486 }
487 487
488 // if(QMessageBox::warning(0, msg, QObject::tr("Error"), QObject::tr("&OK"), QObject::tr("&Details...")) == QMessageBox::No) 488 // if(QMessageBox::warning(0, msg, QObject::tr("Error"), QObject::tr("&OK"), QObject::tr("&Details...")) == QMessageBox::No)
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 ||
496 _pppdata->authMethod() == AUTH_PAPCHAP) 496 _pppdata->authMethod() == AUTH_PAPCHAP)
497 Modem::modem->setSecret(_pppdata->authMethod(), 497 Modem::modem->setSecret(_pppdata->authMethod(),
498 encodeWord(_pppdata->storedUsername()), 498 encodeWord(_pppdata->storedUsername()),
@@ -508,13 +508,13 @@ void KPPPWidget::sigPPPDDied() {
508 } 508 }
509 _pppdata->setpppdError(0); 509 _pppdata->setpppdError(0);
510 } 510 }
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;
518// // helperPid = -1; 518// // helperPid = -1;
519// QString msg = QObject::tr("kppp's helper process just died.\n" 519// QString msg = QObject::tr("kppp's helper process just died.\n"
520// "Since a further execution would be pointless, " 520// "Since a further execution would be pointless, "