summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan
authormickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
committer mickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
commit16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff)
tree0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/settings/networksettings/wlan
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-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)
-rw-r--r--noncore/settings/networksettings/wlan/infoimp.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp12
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp6
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp24
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp54
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
@@ -13,7 +13,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
WExtensions *wExtensions = new WExtensions(name);
if(!wExtensions->doesHaveWirelessExtensions()){
delete wExtensions;
- qDebug("WlanInfoImp::No wireless extension");
+ odebug << "WlanInfoImp::No wireless extension" << oendl;
return;
}
delete wExtensions;
@@ -28,7 +28,7 @@ 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
@@ -112,7 +112,7 @@ int WExtensions::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;
}
@@ -177,12 +177,12 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
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;
@@ -190,7 +190,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
}
}
- qDebug("WExtensions::statsCard no longer present.");
+ odebug << "WExtensions::statsCard no longer present." << oendl;
quality = -1;
signal = IW_LOWER;
noise = IW_LOWER;
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
@@ -45,7 +45,7 @@ WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, W
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)));
}
@@ -146,7 +146,7 @@ void WLANImp::changeAndSaveSettingFile(){
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;
}
@@ -236,7 +236,7 @@ void WLANImp::accept(){
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
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
@@ -52,7 +52,7 @@ 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() ) );
@@ -233,7 +233,7 @@ void WLANImp::writeOpts() {
}
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!!!");
@@ -307,7 +307,7 @@ 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 );
@@ -330,12 +330,12 @@ 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
@@ -349,14 +349,14 @@ void WLANImp::rescanNeighbourhood()
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;
}
@@ -365,7 +365,7 @@ void WLANImp::rescanNeighbourhood()
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;
}
@@ -398,15 +398,15 @@ 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 );
}
}
@@ -439,7 +439,7 @@ void WLANImp::handlePacket( OPacket* p )
}
else
{
- qWarning( "handlePacket(): invalid frame [possibly noise] detected!" );
+ owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
return;
}
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
@@ -122,13 +122,13 @@ bool WLANModule::remove(Interface*){
void WLANModule::receive(const QCString &param, 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;
}
@@ -137,38 +137,38 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
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;
}
@@ -195,9 +195,9 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
}
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") ){
@@ -218,10 +218,10 @@ void WLANModule::receive(const QCString &param, 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 );
}
@@ -229,27 +229,27 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
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;
}