summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/modem.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/modem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/modem.cpp48
1 files changed, 24 insertions, 24 deletions
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
@@ -57,3 +57,3 @@
#define MY_ASSERT(x) if (!(x)) { \
- qFatal( "ASSERT: \"%s\" in %s (%d)\n",#x,__FILE__,__LINE__); \
+ ofatal << "ASSERT: \"" << #x << "\" in " << __FILE__ << " (" << __LINE__ << ")\n" << oendl; \
exit(1); }
@@ -167,3 +167,3 @@ bool Modem::opentty() {
if ((modemfd = open(device, O_RDWR|O_NDELAY|O_NOCTTY)) == -1) {
- qDebug("error opening modem device !");
+ odebug << "error opening modem device !" << oendl;
errmsg = QObject::tr("Unable to open modem.");
@@ -308,5 +308,5 @@ void Modem::startNotifier() {
connect(sn, SIGNAL(activated(int)), SLOT(readtty(int)));
- qDebug("QSocketNotifier started!");
+ odebug << "QSocketNotifier started!" << oendl;
} else {
- qDebug("QSocketNotifier re-enabled!");
+ odebug << "QSocketNotifier re-enabled!" << oendl;
sn->setEnabled(true);
@@ -323,3 +323,3 @@ void Modem::stopNotifier() {
sn = 0;
- qDebug( "QSocketNotifier stopped!" );
+ odebug << "QSocketNotifier stopped!" << oendl;
}
@@ -339,3 +339,3 @@ bool Modem::writeChar(unsigned char c) {
if (s < 0) {
- qError( "write() in Modem::writeChar failed" );
+ oerr << "write() in Modem::writeChar failed" << oendl;
return false;
@@ -367,3 +367,3 @@ bool Modem::writeLine(const char *buf) {
// TODO do something meaningful with the error code (or ignore it
- qError( "write() in Modem::writeLine failed" );
+ oerr << "write() in Modem::writeLine failed" << oendl;
delete[] b;
@@ -476,3 +476,3 @@ QString Modem::parseModemSpeed(const QString &s) {
- qDebug( "Modem reported result string: %s", s.latin1());
+ odebug << "Modem reported result string: " << s.latin1() << "" << oendl;
@@ -562,3 +562,3 @@ QString Modem::parseModemSpeed(const QString &s) {
- qDebug( "The parsed result is: %s", result.latin1());
+ odebug << "The parsed result is: " << result.latin1() << "" << oendl;
@@ -575,3 +575,3 @@ int Modem::lockdevice() {
if(!_pppdata->modemLockFile()) {
- qDebug("The user doesn't want a lockfile.");
+ odebug << "The user doesn't want a lockfile." << oendl;
return 0;
@@ -597,3 +597,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
- qDebug( "Device is locked by: %s", oldlock);
+ odebug << "Device is locked by: " << oldlock << "" << oendl;
@@ -610,3 +610,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
- qDebug( "lockfile is stale" );
+ odebug << "lockfile is stale" << oendl;
}
@@ -617,3 +617,3 @@ if ((fd = openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) {
sprintf(newlock,"%010d\n", getpid());
- qDebug("Locking Device: %s", newlock);
+ odebug << "Locking Device: " << newlock << "" << oendl;
@@ -634,3 +634,3 @@ void Modem::unlockdevice() {
if (modem_is_locked) {
- qDebug( "UnLocking Modem Device" );
+ odebug << "UnLocking Modem Device" << oendl;
close(modemfd);
@@ -656,3 +656,3 @@ int Modem::openLockfile( QString lockfile, int flags)
lockfile += device.right( device.length() - device.findRev("/") -1 );
- qDebug("lockfile >%s<",lockfile.latin1());
+ odebug << "lockfile >" << lockfile.latin1() << "<" << oendl;
// TODO:
@@ -668,3 +668,3 @@ int Modem::openLockfile( QString lockfile, int flags)
if ((fd = open(lockfile, flags, mode)) == -1) {
- qDebug("error opening lockfile!");
+ odebug << "error opening lockfile!" << oendl;
lockfile = QString::null;
@@ -929,3 +929,3 @@ bool Modem::execpppd(const char *arguments) {
default:
- qDebug("In parent: pppd pid %d\n",pppdPid);
+ odebug << "In parent: pppd pid " << pppdPid << "\n" << oendl;
close(modemfd);
@@ -937,3 +937,3 @@ bool Modem::execpppd(const char *arguments) {
if ( !(flag & O_NONBLOCK) ) {
- qDebug("Setting nonblocking io");
+ odebug << "Setting nonblocking io" << oendl;
flag |= O_NONBLOCK;
@@ -956,3 +956,3 @@ bool Modem::execpppd(const char *arguments) {
bool Modem::killpppd() {
- qDebug("In killpppd and pid is %d", pppdPid );
+ odebug << "In killpppd and pid is " << pppdPid << "" << oendl;
if(pppdPid > 0) {
@@ -960,7 +960,7 @@ bool Modem::killpppd() {
m_modemDebug = 0;
- qDebug("In killpppd(): Sending SIGTERM to %d\n", pppdPid);
+ odebug << "In killpppd(): Sending SIGTERM to " << pppdPid << "\n" << oendl;
if(kill(pppdPid, SIGTERM) < 0) {
- qDebug("Error terminating %d. Sending SIGKILL\n", pppdPid);
+ odebug << "Error terminating " << pppdPid << ". Sending SIGKILL\n" << oendl;
if(kill(pppdPid, SIGKILL) < 0) {
- qDebug("Error killing %d\n", pppdPid);
+ odebug << "Error killing " << pppdPid << "\n" << oendl;
return false;
@@ -1037,3 +1037,3 @@ int Modem::openResolv(int flags)
if ((fd = open(_PATH_RESCONF, flags)) == -1) {
- qDebug("error opening resolv.conf!");
+ odebug << "error opening resolv.conf!" << oendl;
fd = open(DEVNULL, O_RDONLY);
@@ -1058,3 +1058,3 @@ pid_t Modem::pppPID()const {
void Modem::setPPPDPid( pid_t pid ) {
- qDebug("Modem setting pid");
+ odebug << "Modem setting pid" << oendl;
_pppdExitStatus = -1;