author | ar <ar> | 2004-05-15 22:36:18 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-15 22:36:18 (UTC) |
commit | 736a153edfac343d0794ecafc5dc2f2c405260a7 (patch) (side-by-side diff) | |
tree | ebb41331403fa78769df2a344bfe12bbd1df6c46 /noncore/settings/networksettings/ppp/modem.cpp | |
parent | d4a82558ff3ae6ed7bbc5dbc9857461057eb3da3 (diff) | |
download | opie-736a153edfac343d0794ecafc5dc2f2c405260a7.zip opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.gz opie-736a153edfac343d0794ecafc5dc2f2c405260a7.tar.bz2 |
- convert qDebug to odebug
Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 5913a22..3bc7d43 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp @@ -171,5 +171,5 @@ bool Modem::opentty() { device = _pppdata->modemDevice(); if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) { - odebug << "error opening modem device !" << oendl; + odebug << "error opening modem device !" << oendl; errmsg = QObject::tr("Unable to open modem."); return false; @@ -312,7 +312,7 @@ void Modem::startNotifier() { sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this); connect(sn, SIGNAL(activated(int)), SLOT(readtty(int))); - odebug << "QSocketNotifier started!" << oendl; + odebug << "QSocketNotifier started!" << oendl; } else { - odebug << "QSocketNotifier re-enabled!" << oendl; + odebug << "QSocketNotifier re-enabled!" << oendl; sn->setEnabled(true); } @@ -327,5 +327,5 @@ void Modem::stopNotifier() { delete sn; sn = 0; - odebug << "QSocketNotifier stopped!" << oendl; + odebug << "QSocketNotifier stopped!" << oendl; } } @@ -343,5 +343,5 @@ bool Modem::writeChar(unsigned char c) { s = write(modemfd, &c, 1); if (s < 0) { - oerr << "write() in Modem::writeChar failed" << oendl; + oerr << "write() in Modem::writeChar failed" << oendl; return false; } @@ -371,5 +371,5 @@ bool Modem::writeLine(const char *buf) { if(wr < 0) { // TODO do something meaningful with the error code (or ignore it - oerr << "write() in Modem::writeLine failed" << oendl; + oerr << "write() in Modem::writeLine failed" << oendl; delete[] b; return false; @@ -480,5 +480,5 @@ QString Modem::parseModemSpeed(const QString &s) { QString result; - odebug << "Modem reported result string: " << s.latin1() << "" << oendl; + odebug << "Modem reported result string: " << s.latin1() << "" << oendl; const int RXMAX = 7; @@ -566,5 +566,5 @@ QString Modem::parseModemSpeed(const QString &s) { result.sprintf("%d/%d", rx, tx); - odebug << "The parsed result is: " << result.latin1() << "" << oendl; + odebug << "The parsed result is: " << result.latin1() << "" << oendl; return result; @@ -579,5 +579,5 @@ int Modem::lockdevice() { if(!_pppdata->modemLockFile()) { - odebug << "The user doesn't want a lockfile." << oendl; + odebug << "The user doesn't want a lockfile." << oendl; return 0; } @@ -601,5 +601,5 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { oldlock[sz] = '\0'; - odebug << "Device is locked by: " << oldlock << "" << oendl; + odebug << "Device is locked by: " << oldlock << "" << oendl; int oldpid; @@ -614,5 +614,5 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { return 1; - odebug << "lockfile is stale" << oendl; + odebug << "lockfile is stale" << oendl; } } @@ -621,5 +621,5 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { if(fd >= 0) { sprintf(newlock,"%010d\n", getpid()); - odebug << "Locking Device: " << newlock << "" << oendl; + odebug << "Locking Device: " << newlock << "" << oendl; write(fd, newlock, strlen(newlock)); @@ -638,5 +638,5 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { void Modem::unlockdevice() { if (modem_is_locked) { - odebug << "UnLocking Modem Device" << oendl; + odebug << "UnLocking Modem Device" << oendl; close(modemfd); modemfd = -1; @@ -660,5 +660,5 @@ int Modem::openLockfile( QString lockfile, int flags) lockfile += "/LCK.."; lockfile += device.right( device.length() - device.findRev("/") -1 ); - odebug << "lockfile >" << lockfile.latin1() << "<" << oendl; + odebug << "lockfile >" << lockfile.latin1() << "<" << oendl; // TODO: // struct stat st; @@ -672,5 +672,5 @@ int Modem::openLockfile( QString lockfile, int flags) // } if ((fd = open(lockfile, flags, mode)) == -1) { - odebug << "error opening lockfile!" << oendl; + odebug << "error opening lockfile!" << oendl; lockfile = QString::null; fd = open(DEVNULL, O_RDONLY); @@ -933,5 +933,5 @@ bool Modem::execpppd(const char *arguments) { default: - odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl; + odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl; close(modemfd); @@ -941,5 +941,5 @@ bool Modem::execpppd(const char *arguments) { if ( !(flag & O_NONBLOCK) ) { - odebug << "Setting nonblocking io" << oendl; + odebug << "Setting nonblocking io" << oendl; flag |= O_NONBLOCK; ::fcntl(m_pppdLOG[0], F_SETFL, flag ); @@ -960,13 +960,13 @@ bool Modem::execpppd(const char *arguments) { bool Modem::killpppd() { - odebug << "In killpppd and pid is " << pppdPid << "" << oendl; + odebug << "In killpppd and pid is " << pppdPid << "" << oendl; if(pppdPid > 0) { delete m_modemDebug; m_modemDebug = 0; - odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl; + odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl; if(kill(pppdPid, SIGTERM) < 0) { - odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl; + odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl; if(kill(pppdPid, SIGKILL) < 0) { - odebug << "Error killing " << pppdPid << "\n" << oendl; + odebug << "Error killing " << pppdPid << "\n" << oendl; return false; } @@ -1005,9 +1005,9 @@ void Modem::parseargs(char* buf, char** args) { if (!quotes) while ((*buf != '\0') && (*buf != '\n') && - (*buf != '\t') && (*buf != ' ')) - buf++; + (*buf != '\t') && (*buf != ' ')) + buf++; else { while ((*buf != '\0') && (*buf != quotes)) - buf++; + buf++; *buf++ = '\0'; } @@ -1041,5 +1041,5 @@ int Modem::openResolv(int flags) int fd; if ((fd = open(_PATH_RESCONF, flags)) == -1) { - odebug << "error opening resolv.conf!" << oendl; + odebug << "error opening resolv.conf!" << oendl; fd = open(DEVNULL, O_RDONLY); } @@ -1062,5 +1062,5 @@ pid_t Modem::pppPID()const { } void Modem::setPPPDPid( pid_t pid ) { - odebug << "Modem setting pid" << oendl; + odebug << "Modem setting pid" << oendl; _pppdExitStatus = -1; pppdPid = pid; |