author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/settings/networksettings/interfaces/interface.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.cpp | 20 |
1 files changed, 10 insertions, 10 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 @@ -136,15 +136,15 @@ bool Interface::refresh(){ QString fileName = QString("/tmp/%1_ifconfig_info").arg(this->name()); int ret = system(QString("LANG=C %1 %2 > %3").arg(IFCONFIG).arg(this->name()).arg(fileName).latin1()); if(ret != 0){ - qDebug(QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1()); + odebug << QString("Interface: Ifconfig return value: %1, is not 0").arg(ret).latin1() << oendl; return false; } QFile file(fileName); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } // Set to the defaults @@ -200,9 +200,9 @@ bool Interface::refresh(){ } file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } // leaseTime and renewalTime and used if pid and deamon exe can be accessed. @@ -219,16 +219,16 @@ bool Interface::refresh(){ if(line.contains("RENEWALTIME=")) renewalTime = line.mid(12, line.length()).toInt(); } file.close(); - //qDebug(QString("Interface: leaseTime: %1").arg(leaseTime).latin1()); - //qDebug(QString("Interface: renewalTime: %1").arg(renewalTime).latin1()); + //odebug << QString("Interface: leaseTime: %1").arg(leaseTime).latin1() << oendl; + //odebug << QString("Interface: renewalTime: %1").arg(renewalTime).latin1() << oendl; // Get the pid of the deamond dhcpFile = (QString(dhcpDirectory+"/dhcpcd-%1.pid").arg(this->name())); file.setName(dhcpFile); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(dhcpFile).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(dhcpFile).latin1() << oendl; return false; } int pid = -1; @@ -239,18 +239,18 @@ bool Interface::refresh(){ } file.close(); if( pid == -1){ - qDebug("Interface: Could not get pid of dhcpc deamon."); + odebug << "Interface: Could not get pid of dhcpc deamon." << oendl; return false; } // Get the start running time of the deamon fileName = (QString("/proc/%1/stat").arg(pid)); file.setName(fileName); stream.setDevice( &file ); if (!file.open(IO_ReadOnly)){ - qDebug(QString("Interface: Can't open file: %1").arg(fileName).latin1()); + odebug << QString("Interface: Can't open file: %1").arg(fileName).latin1() << oendl; return false; } while ( !stream.eof() ) { line = stream.readLine(); @@ -277,14 +277,14 @@ bool Interface::refresh(){ datetime = datetime.addSecs((-1*sec)); f.close(); } else{ - qDebug("Interface: Can't open /proc/uptime to retrive uptime."); + odebug << "Interface: Can't open /proc/uptime to retrive uptime." << oendl; return false; } datetime = datetime.addSecs(time); - //qDebug(QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1()); + //odebug << QString("Interface: %1 %2").arg(datetime.toString()).arg(pid).latin1() << oendl; // Calculate the start and renew times leaseObtained = datetime.toString(); |