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/wlan | |
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/wlan') (more/less context) (ignore whitespace changes)
5 files changed, 50 insertions, 50 deletions
diff --git a/noncore/settings/networksettings/wlan/infoimp.cpp b/noncore/settings/networksettings/wlan/infoimp.cpp index bd56678..c558f5e 100644 --- a/noncore/settings/networksettings/wlan/infoimp.cpp +++ b/noncore/settings/networksettings/wlan/infoimp.cpp @@ -12,9 +12,9 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInfo(parent, name, fl){ WExtensions *wExtensions = new WExtensions(name); if(!wExtensions->doesHaveWirelessExtensions()){ delete wExtensions; - qDebug("WlanInfoImp::No wireless extension"); + odebug << "WlanInfoImp::No wireless extension" << oendl; return; } delete wExtensions; timer = new QTimer( this ); @@ -27,9 +27,9 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf */ void WlanInfoImp::update(){ WExtensions *wExtensions = new WExtensions(this->name()); if(!wExtensions->doesHaveWirelessExtensions()){ - qDebug("No extension"); + odebug << "No extension" << oendl; delete wExtensions; timer->stop(); return; } diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index d1fff88..9c64323 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp @@ -111,9 +111,9 @@ int WExtensions::channel(){ return channel; left += 0.005; right += 0.005; } - qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); + odebug << QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1() << oendl; return -1; } /*** @@ -176,22 +176,22 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){ while(!wstream.atEnd()){ wstream >> name >> status >> quality >> c >> signal >> c >> noise; if(name == QString("%1:").arg(interface)){ if ( quality > 92 ) - qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); + odebug << "WIFIAPPLET: D'oh! Quality " << quality << " > estimated max!\n" << oendl; if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); + odebug << "WIFIAPPLET: Doh! Strength " << signal << " > estimated max!\n" << oendl; if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) - qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); - //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); + odebug << "WIFIAPPLET: Doh! Noise " << noise << " > estimated max!\n" << oendl; + //odebug << QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1() << oendl; signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; quality = ( quality*100 ) / 92; return true; } } - qDebug("WExtensions::statsCard no longer present."); + odebug << "WExtensions::statsCard no longer present." << oendl; quality = -1; signal = IW_LOWER; noise = IW_LOWER; return false; diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp index 80a9927..fe7941d 100644 --- a/noncore/settings/networksettings/wlan/wlanimp.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp.cpp @@ -44,9 +44,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W settingsFileText = QStringList::split("\n", line, true); parseSettingFile(); } else - qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); + odebug << QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1() << oendl; connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); } void WLANImp::typeChanged(int mod){ @@ -145,9 +145,9 @@ void WLANImp::changeAndSaveSettingFile(){ QFile::remove(wlanFile); QFile file(wlanFile); if (!file.open(IO_ReadWrite)){ - qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); + odebug << QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1() << oendl; return; } QTextStream stream( &file ); @@ -235,9 +235,9 @@ void WLANImp::accept(){ insert << "-c"; insert << "cardctl eject && cardctl insert"; if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) { - qWarning("could not start cardctl"); + owarn << "could not start cardctl" << oendl; } // Close out the dialog QDialog::accept(); diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp index eeebe7f..e483efe 100644 --- a/noncore/settings/networksettings/wlan/wlanimp2.cpp +++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp @@ -51,9 +51,9 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W // Check sanity - the existance of the wireless-tools if-pre-up script QFile file(QString(PREUP)); if (file.exists()) { - qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); + owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl; } connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); connect( netView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( selectNetwork(QListViewItem*) ) ); @@ -232,9 +232,9 @@ void WLANImp::writeOpts() { return; } bool error = false; - qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); + odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl; if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); @@ -306,9 +306,9 @@ void WLANImp::writeOpts() { void WLANImp::rescanNeighbourhood() { QString name = interface->getInterfaceName(); - qDebug( "rescanNeighbourhood via '%s'", (const char*) name ); + odebug << "rescanNeighbourhood via '" << (const char*) name << "'" << oendl; OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) ); assert( wiface ); @@ -329,14 +329,14 @@ void WLANImp::rescanNeighbourhood() } } if ( devicetype.isEmpty() ) { - qWarning( "rescanNeighbourhood(): couldn't guess device type :(" ); + owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl; return; } else { - qDebug( "rescanNeighbourhood(): device type seems to be '%s'", (const char*) devicetype ); + odebug << "rescanNeighbourhood(): device type seems to be '" << (const char*) devicetype << "'" << oendl; } // configure interface to receive 802.11 management frames @@ -348,25 +348,25 @@ void WLANImp::rescanNeighbourhood() else if ( devicetype == "wlan-ng" ) wiface->setMonitoring( new OWlanNGMonitoringInterface( wiface, false ) ); else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) ); else { - qDebug( "rescanNeighbourhood(): unsupported device type for monitoring :(" ); + odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl; return; } wiface->setMode( "monitor" ); if ( wiface->mode() != "monitor" ) { - qWarning( "rescanNeighbourhood(): Unable to bring device into monitor mode (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl; return; } // open a packet capturer OPacketCapturer* cap = new OPacketCapturer(); cap->open( name ); if ( !cap->isOpen() ) { - qWarning( "rescanNeighbourhood(): Unable to open libpcap (%s).", strerror( errno ) ); + owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl; return; } // display splash screen @@ -397,17 +397,17 @@ void WLANImp::rescanNeighbourhood() { wiface->setChannel( i ); pb->setProgress( i ); qApp->processEvents(); - qDebug( "rescanNeighbourhood(): listening on channel %d...", i ); + odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl; OPacket* p = cap->next( 1000 ); if ( !p ) { - qDebug( "rescanNeighbourhood(): nothing received on channel %d", i ); + odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl; } else { - qDebug( "rescanNeighbourhood(): TADAA - something came in on channel %d", i ); + odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl; handlePacket( p ); } } @@ -438,9 +438,9 @@ void WLANImp::handlePacket( OPacket* p ) type = "managed"; } else { - qWarning( "handlePacket(): invalid frame [possibly noise] detected!" ); + owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl; return; } OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp index 74d7f8e..886af10 100644 --- a/noncore/settings/networksettings/wlan/wlanmodule.cpp +++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp @@ -121,55 +121,55 @@ bool WLANModule::remove(Interface*){ } void WLANModule::receive(const QCString ¶m, const QByteArray &arg) { - qDebug("WLANModule::receive "+param); + odebug << "WLANModule::receive "+param << oendl; QStringList params = QStringList::split(",",param); int count = params.count(); - qDebug("WLANModule got %i params", count ); + odebug << "WLANModule got " << count << " params" << oendl; if (count < 2){ - qDebug("Erorr less than 2 parameter"); - qDebug("RETURNING"); + odebug << "Erorr less than 2 parameter" << oendl; + odebug << "RETURNING" << oendl; return; } QDataStream stream(arg,IO_ReadOnly); QString interface; QString action; int countMsgs = 0; stream >> interface; - qDebug("got count? >%s<",interface.latin1()); + odebug << "got count? >" << interface.latin1() << "<" << oendl; if (interface == "count"){ - qDebug("got count"); + odebug << "got count" << oendl; stream >> action; - qDebug("Got count num >%s<", action.latin1()); + odebug << "Got count num >" << action.latin1() << "<" << oendl; countMsgs = action.toInt(); } QDialog *toShow; //while (! stream.atEnd() ){ for (int i = 0; i < countMsgs; i++){ - qDebug("start stream %d/%d",i,countMsgs); + odebug << "start stream " << i << "/" << countMsgs << "" << oendl; if (stream.atEnd()){ - qDebug("end of stream"); + odebug << "end of stream" << oendl; return; } stream >> interface; - qDebug("got iface"); + odebug << "got iface" << oendl; stream >> action; - qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); + odebug << "WLANModule got interface " << interface.latin1() << " and acion " << action.latin1() << "" << oendl; // find interfaces Interface *ifa=0; for ( Interface *i=list.first(); i != 0; i=list.next() ){ if (i->getInterfaceName() == interface){ - qDebug("WLANModule found interface %s",interface.latin1()); + odebug << "WLANModule found interface " << interface.latin1() << "" << oendl; ifa = i; } } if (ifa == 0){ - qDebug("WLANModule Did not find %s",interface.latin1()); - qDebug("skipping"); + odebug << "WLANModule Did not find " << interface.latin1() << "" << oendl; + odebug << "skipping" << oendl; count = 0; } if (count == 2){ @@ -194,11 +194,11 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) toShow = (QDialog*) wlanconfigWiget; } QPEApplication::showWidget( wlanconfigWiget ); stream >> value; - qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); + odebug << "WLANModule (build 4) is setting " << action.latin1() << " of " << interface.latin1() << " to " << value.latin1() << "" << oendl; if (value.isEmpty()){ - qDebug("value is empty!!!\nreturning"); + odebug << "value is empty!!!\nreturning" << oendl; return; } if ( action.contains("ESSID") ){ QComboBox *combo = wlanconfigWiget->essid; @@ -217,39 +217,39 @@ void WLANModule::receive(const QCString ¶m, const QByteArray &arg) } }else if (action.contains("Channel")){ bool ok; - qDebug("converting channel"); + odebug << "converting channel" << oendl; int chan = value.toInt( &ok ); if (ok){ - qDebug("ok setting channel"); + odebug << "ok setting channel" << oendl; wlanconfigWiget->specifyChan->setChecked( true ); wlanconfigWiget->networkChannel->setValue( chan ); } }else if (action.contains("MacAddr")){ wlanconfigWiget->specifyAp->setChecked( true ); wlanconfigWiget->macEdit->setText( value ); }else - qDebug("wlan plugin has no clue"); + odebug << "wlan plugin has no clue" << oendl; } - qDebug("next stream"); + odebug << "next stream" << oendl; }// while stream - qDebug("end of stream"); + odebug << "end of stream" << oendl; if (toShow) toShow->exec(); - qDebug("returning"); + odebug << "returning" << oendl; } QWidget *WLANModule::getInfo( Interface *i) { - qDebug("WLANModule::getInfo start"); + odebug << "WLANModule::getInfo start" << oendl; WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); info->tabWidget->insertTab(information, "TCP/IP", 0); info->tabWidget->setCurrentPage( 0 ); info->tabWidget->showPage( information ); - if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); - else qDebug("infotab NOT OK"); - qDebug("current idx %d", info->tabWidget->currentPageIndex()); - qDebug("WLANModule::getInfo return"); + if (info->tabWidget->currentPage() == information ) odebug << "infotab OK" << oendl; + else odebug << "infotab NOT OK" << oendl; + odebug << "current idx " << info->tabWidget->currentPageIndex() << "" << oendl; + odebug << "WLANModule::getInfo return" << oendl; return info; } |