summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/connect.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/connect.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/connect.cpp10
1 files changed, 5 insertions, 5 deletions
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
@@ -463,25 +463,25 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
463 463
464 // execute the script 464 // execute the script
465 if(vmain == 2) { 465 if(vmain == 2) {
466 if(!expecting && !pausing && !scanning) { 466 if(!expecting && !pausing && !scanning) {
467 467
468 timeout_timer->stop(); 468 timeout_timer->stop();
469 timeout_timer->start(scriptTimeout); 469 timeout_timer->start(scriptTimeout);
470 470
471 if((unsigned) scriptindex < comlist->count()) { 471 if((unsigned) scriptindex < comlist->count()) {
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 }
479 479
480 if (scriptCommand == "Scan") { 480 if (scriptCommand == "Scan") {
481 QString bm = QObject::tr("Scanning %1").arg(scriptArgument); 481 QString bm = QObject::tr("Scanning %1").arg(scriptArgument);
482 messg->setText(bm); 482 messg->setText(bm);
483 emit debugMessage(bm); 483 emit debugMessage(bm);
484 484
485 setScan(scriptArgument); 485 setScan(scriptArgument);
486 scriptindex++; 486 scriptindex++;
487 return; 487 return;
@@ -829,35 +829,35 @@ void ConnectWidget::timerEvent(QTimerEvent *) {
829 829
830 // Close the tty. This prevents the QTimer::singleShot() in 830 // Close the tty. This prevents the QTimer::singleShot() in
831 // Modem::readtty() from re-enabling the socket notifier. 831 // Modem::readtty() from re-enabling the socket notifier.
832 // The port is still held open by the helper process. 832 // The port is still held open by the helper process.
833 833
834 /* Er, there _is_ not QTimer::singleShot() in Modem::readtty(), 834 /* Er, there _is_ not QTimer::singleShot() in Modem::readtty(),
835 and closing the thing prevents pppd from using it later. */ 835 and closing the thing prevents pppd from using it later. */
836 //_ifaceppp->modem()->closetty(); 836 //_ifaceppp->modem()->closetty();
837 837
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());
845 845
846 qApp->flushX(); 846 qApp->flushX();
847 semaphore = true; 847 semaphore = true;
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())
855 adddns( _ifaceppp ); 855 adddns( _ifaceppp );
856 856
857 // O.K we are done here, let's change over to the if_waiting loop 857 // O.K we are done here, let's change over to the if_waiting loop
858 // where we wait for the ppp if (interface) to come up. 858 // where we wait for the ppp if (interface) to come up.
859 859
860 emit if_waiting_signal(); 860 emit if_waiting_signal();
861 } else { 861 } else {
862 862
863 // starting pppd wasn't successful. Error messages were 863 // starting pppd wasn't successful. Error messages were
@@ -1055,25 +1055,25 @@ void ConnectWidget::setExpect(const QString &n) {
1055 QString ts = QObject::tr("Expecting: %1").arg(n); 1055 QString ts = QObject::tr("Expecting: %1").arg(n);
1056 ts.replace(QRegExp("\n"), "<LF>"); 1056 ts.replace(QRegExp("\n"), "<LF>");
1057 emit debugMessage(ts); 1057 emit debugMessage(ts);
1058 1058
1059 // check if the expected string is in the read buffer already. 1059 // check if the expected string is in the read buffer already.
1060 checkBuffers(); 1060 checkBuffers();
1061} 1061}
1062 1062
1063 1063
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
1071 // let's kill the stuck pppd 1071 // let's kill the stuck pppd
1072 _ifaceppp->modem()->killPPPDaemon(); 1072 _ifaceppp->modem()->killPPPDaemon();
1073 1073
1074 emit stopAccounting(); 1074 emit stopAccounting();
1075// p_kppp->con_win->stopClock(); 1075// p_kppp->con_win->stopClock();
1076 1076
1077 1077
1078 // killing ppp will generate a SIGCHLD which will be caught in pppdie() 1078 // killing ppp will generate a SIGCHLD which will be caught in pppdie()
1079 // in main.cpp what happens next will depend on the boolean 1079 // in main.cpp what happens next will depend on the boolean
@@ -1262,25 +1262,25 @@ bool ConnectWidget::execppp() {
1262 1262
1263 command += " call opie-kppp logfd 11"; 1263 command += " call opie-kppp logfd 11";
1264 1264
1265 if (command.length() > MAX_CMDLEN) { 1265 if (command.length() > MAX_CMDLEN) {
1266 QMessageBox::critical(this, "error", QObject::tr( 1266 QMessageBox::critical(this, "error", QObject::tr(
1267 "pppd command + command-line arguments exceed " 1267 "pppd command + command-line arguments exceed "
1268 "2024 characters in length." 1268 "2024 characters in length."
1269 )); 1269 ));
1270 1270
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
1278 return _ifaceppp->modem()->execPPPDaemon(command); 1278 return _ifaceppp->modem()->execPPPDaemon(command);
1279} 1279}
1280 1280
1281 1281
1282void ConnectWidget::closeEvent( QCloseEvent *e ) { 1282void ConnectWidget::closeEvent( QCloseEvent *e ) {
1283 e->ignore(); 1283 e->ignore();
1284 emit cancelbutton(); 1284 emit cancelbutton();
1285} 1285}
1286 1286