summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan
Unidiff
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
13 WExtensions *wExtensions = new WExtensions(name); 13 WExtensions *wExtensions = new WExtensions(name);
14 if(!wExtensions->doesHaveWirelessExtensions()){ 14 if(!wExtensions->doesHaveWirelessExtensions()){
15 delete wExtensions; 15 delete wExtensions;
16 qDebug("WlanInfoImp::No wireless extension"); 16 odebug << "WlanInfoImp::No wireless extension" << oendl;
17 return; 17 return;
18 } 18 }
19 delete wExtensions; 19 delete wExtensions;
@@ -28,7 +28,7 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
28void WlanInfoImp::update(){ 28void WlanInfoImp::update(){
29 WExtensions *wExtensions = new WExtensions(this->name()); 29 WExtensions *wExtensions = new WExtensions(this->name());
30 if(!wExtensions->doesHaveWirelessExtensions()){ 30 if(!wExtensions->doesHaveWirelessExtensions()){
31 qDebug("No extension"); 31 odebug << "No extension" << oendl;
32 delete wExtensions; 32 delete wExtensions;
33 timer->stop(); 33 timer->stop();
34 return; 34 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(){
112 left += 0.005; 112 left += 0.005;
113 right += 0.005; 113 right += 0.005;
114 } 114 }
115 qDebug(QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1()); 115 odebug << QString("Unknown frequency: %1, returning -1 for the channel.").arg(num).latin1() << oendl;
116 return -1; 116 return -1;
117} 117}
118 118
@@ -177,12 +177,12 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
177 wstream >> name >> status >> quality >> c >> signal >> c >> noise; 177 wstream >> name >> status >> quality >> c >> signal >> c >> noise;
178 if(name == QString("%1:").arg(interface)){ 178 if(name == QString("%1:").arg(interface)){
179 if ( quality > 92 ) 179 if ( quality > 92 )
180 qDebug( "WIFIAPPLET: D'oh! Quality %d > estimated max!\n", quality ); 180 odebug << "WIFIAPPLET: D'oh! Quality " << quality << " > estimated max!\n" << oendl;
181 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) ) 181 if ( ( signal > IW_UPPER ) || ( signal < IW_LOWER ) )
182 qDebug( "WIFIAPPLET: Doh! Strength %d > estimated max!\n", signal ); 182 odebug << "WIFIAPPLET: Doh! Strength " << signal << " > estimated max!\n" << oendl;
183 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) ) 183 if ( ( noise > IW_UPPER ) || ( noise < IW_LOWER ) )
184 qDebug( "WIFIAPPLET: Doh! Noise %d > estimated max!\n", noise ); 184 odebug << "WIFIAPPLET: Doh! Noise " << noise << " > estimated max!\n" << oendl;
185 //qDebug(QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1()); 185 //odebug << QString("q:%1, s:%2, n:%3").arg(quality).arg(signal).arg(noise).latin1() << oendl;
186 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER; 186 signal = ( ( signal-IW_LOWER ) * 100 ) / IW_UPPER;
187 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER; 187 noise = ( ( noise-IW_LOWER ) * 100 ) / IW_UPPER;
188 quality = ( quality*100 ) / 92; 188 quality = ( quality*100 ) / 92;
@@ -190,7 +190,7 @@ bool WExtensions::stats(int &signal, int &noise, int &quality){
190 } 190 }
191 } 191 }
192 192
193 qDebug("WExtensions::statsCard no longer present."); 193 odebug << "WExtensions::statsCard no longer present." << oendl;
194 quality = -1; 194 quality = -1;
195 signal = IW_LOWER; 195 signal = IW_LOWER;
196 noise = IW_LOWER; 196 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
45 parseSettingFile(); 45 parseSettingFile();
46 } 46 }
47 else 47 else
48 qDebug(QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1()); 48 odebug << QString("WLANImp: Can't open file: %1 for reading.").arg(wlanFile).latin1() << oendl;
49 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int))); 49 connect(networkType, SIGNAL(activated(int)), this, SLOT(typeChanged(int)));
50} 50}
51 51
@@ -146,7 +146,7 @@ void WLANImp::changeAndSaveSettingFile(){
146 QFile file(wlanFile); 146 QFile file(wlanFile);
147 147
148 if (!file.open(IO_ReadWrite)){ 148 if (!file.open(IO_ReadWrite)){
149 qDebug(QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1()); 149 odebug << QString("WLANImp::changeAndSaveSettingFile(): Can't open file: %1 for writing.").arg(wlanFile).latin1() << oendl;
150 return; 150 return;
151 } 151 }
152 152
@@ -236,7 +236,7 @@ void WLANImp::accept(){
236 insert << "cardctl eject && cardctl insert"; 236 insert << "cardctl eject && cardctl insert";
237 237
238 if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) { 238 if (!insert.start(OProcess::DontCare, OProcess::NoCommunication) ) {
239 qWarning("could not start cardctl"); 239 owarn << "could not start cardctl" << oendl;
240 } 240 }
241 241
242 // Close out the dialog 242 // 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
52 // Check sanity - the existance of the wireless-tools if-pre-up script 52 // Check sanity - the existance of the wireless-tools if-pre-up script
53 QFile file(QString(PREUP)); 53 QFile file(QString(PREUP));
54 if (file.exists()) { 54 if (file.exists()) {
55 qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); 55 owarn << QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools") << oendl;
56 } 56 }
57 57
58 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); 58 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) );
@@ -233,7 +233,7 @@ void WLANImp::writeOpts() {
233 } 233 }
234 bool error = false; 234 bool error = false;
235 235
236 qDebug("setting wlan interface %s", interfaces->getInterfaceName( error ).latin1() ); 236 odebug << "setting wlan interface " << interfaces->getInterfaceName( error ).latin1() << "" << oendl;
237 237
238 if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!"); 238 if (error) QMessageBox::warning(0,"Inface not set","should not happen!!!");
239 239
@@ -307,7 +307,7 @@ void WLANImp::writeOpts() {
307void WLANImp::rescanNeighbourhood() 307void WLANImp::rescanNeighbourhood()
308{ 308{
309 QString name = interface->getInterfaceName(); 309 QString name = interface->getInterfaceName();
310 qDebug( "rescanNeighbourhood via '%s'", (const char*) name ); 310 odebug << "rescanNeighbourhood via '" << (const char*) name << "'" << oendl;
311 311
312 OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) ); 312 OWirelessNetworkInterface* wiface = static_cast<OWirelessNetworkInterface*>( ONetwork::instance()->interface( name ) );
313 assert( wiface ); 313 assert( wiface );
@@ -330,12 +330,12 @@ void WLANImp::rescanNeighbourhood()
330 } 330 }
331 if ( devicetype.isEmpty() ) 331 if ( devicetype.isEmpty() )
332 { 332 {
333 qWarning( "rescanNeighbourhood(): couldn't guess device type :(" ); 333 owarn << "rescanNeighbourhood(): couldn't guess device type :(" << oendl;
334 return; 334 return;
335 } 335 }
336 else 336 else
337 { 337 {
338 qDebug( "rescanNeighbourhood(): device type seems to be '%s'", (const char*) devicetype ); 338 odebug << "rescanNeighbourhood(): device type seems to be '" << (const char*) devicetype << "'" << oendl;
339 } 339 }
340 340
341 // configure interface to receive 802.11 management frames 341 // configure interface to receive 802.11 management frames
@@ -349,14 +349,14 @@ void WLANImp::rescanNeighbourhood()
349 else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) ); 349 else if ( devicetype == "orinoco" ) wiface->setMonitoring( new OOrinocoMonitoringInterface( wiface, false ) );
350 else 350 else
351 { 351 {
352 qDebug( "rescanNeighbourhood(): unsupported device type for monitoring :(" ); 352 odebug << "rescanNeighbourhood(): unsupported device type for monitoring :(" << oendl;
353 return; 353 return;
354 } 354 }
355 355
356 wiface->setMode( "monitor" ); 356 wiface->setMode( "monitor" );
357 if ( wiface->mode() != "monitor" ) 357 if ( wiface->mode() != "monitor" )
358 { 358 {
359 qWarning( "rescanNeighbourhood(): Unable to bring device into monitor mode (%s).", strerror( errno ) ); 359 owarn << "rescanNeighbourhood(): Unable to bring device into monitor mode (" << strerror( errno ) << ")." << oendl;
360 return; 360 return;
361 } 361 }
362 362
@@ -365,7 +365,7 @@ void WLANImp::rescanNeighbourhood()
365 cap->open( name ); 365 cap->open( name );
366 if ( !cap->isOpen() ) 366 if ( !cap->isOpen() )
367 { 367 {
368 qWarning( "rescanNeighbourhood(): Unable to open libpcap (%s).", strerror( errno ) ); 368 owarn << "rescanNeighbourhood(): Unable to open libpcap (" << strerror( errno ) << ")." << oendl;
369 return; 369 return;
370 } 370 }
371 371
@@ -398,15 +398,15 @@ void WLANImp::rescanNeighbourhood()
398 wiface->setChannel( i ); 398 wiface->setChannel( i );
399 pb->setProgress( i ); 399 pb->setProgress( i );
400 qApp->processEvents(); 400 qApp->processEvents();
401 qDebug( "rescanNeighbourhood(): listening on channel %d...", i ); 401 odebug << "rescanNeighbourhood(): listening on channel " << i << "..." << oendl;
402 OPacket* p = cap->next( 1000 ); 402 OPacket* p = cap->next( 1000 );
403 if ( !p ) 403 if ( !p )
404 { 404 {
405 qDebug( "rescanNeighbourhood(): nothing received on channel %d", i ); 405 odebug << "rescanNeighbourhood(): nothing received on channel " << i << "" << oendl;
406 } 406 }
407 else 407 else
408 { 408 {
409 qDebug( "rescanNeighbourhood(): TADAA - something came in on channel %d", i ); 409 odebug << "rescanNeighbourhood(): TADAA - something came in on channel " << i << "" << oendl;
410 handlePacket( p ); 410 handlePacket( p );
411 } 411 }
412 } 412 }
@@ -439,7 +439,7 @@ void WLANImp::handlePacket( OPacket* p )
439 } 439 }
440 else 440 else
441 { 441 {
442 qWarning( "handlePacket(): invalid frame [possibly noise] detected!" ); 442 owarn << "handlePacket(): invalid frame [possibly noise] detected!" << oendl;
443 return; 443 return;
444 } 444 }
445 445
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*){
122 122
123void WLANModule::receive(const QCString &param, const QByteArray &arg) 123void WLANModule::receive(const QCString &param, const QByteArray &arg)
124{ 124{
125 qDebug("WLANModule::receive "+param); 125 odebug << "WLANModule::receive "+param << oendl;
126 QStringList params = QStringList::split(",",param); 126 QStringList params = QStringList::split(",",param);
127 int count = params.count(); 127 int count = params.count();
128 qDebug("WLANModule got %i params", count ); 128 odebug << "WLANModule got " << count << " params" << oendl;
129 if (count < 2){ 129 if (count < 2){
130 qDebug("Erorr less than 2 parameter"); 130 odebug << "Erorr less than 2 parameter" << oendl;
131 qDebug("RETURNING"); 131 odebug << "RETURNING" << oendl;
132 return; 132 return;
133 } 133 }
134 134
@@ -137,38 +137,38 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
137 QString action; 137 QString action;
138 int countMsgs = 0; 138 int countMsgs = 0;
139 stream >> interface; 139 stream >> interface;
140 qDebug("got count? >%s<",interface.latin1()); 140 odebug << "got count? >" << interface.latin1() << "<" << oendl;
141 if (interface == "count"){ 141 if (interface == "count"){
142 qDebug("got count"); 142 odebug << "got count" << oendl;
143 stream >> action; 143 stream >> action;
144 qDebug("Got count num >%s<", action.latin1()); 144 odebug << "Got count num >" << action.latin1() << "<" << oendl;
145 countMsgs = action.toInt(); 145 countMsgs = action.toInt();
146 } 146 }
147 147
148 QDialog *toShow; 148 QDialog *toShow;
149 //while (! stream.atEnd() ){ 149 //while (! stream.atEnd() ){
150 for (int i = 0; i < countMsgs; i++){ 150 for (int i = 0; i < countMsgs; i++){
151 qDebug("start stream %d/%d",i,countMsgs); 151 odebug << "start stream " << i << "/" << countMsgs << "" << oendl;
152 if (stream.atEnd()){ 152 if (stream.atEnd()){
153 qDebug("end of stream"); 153 odebug << "end of stream" << oendl;
154 return; 154 return;
155 } 155 }
156 stream >> interface; 156 stream >> interface;
157 qDebug("got iface"); 157 odebug << "got iface" << oendl;
158 stream >> action; 158 stream >> action;
159 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); 159 odebug << "WLANModule got interface " << interface.latin1() << " and acion " << action.latin1() << "" << oendl;
160 // find interfaces 160 // find interfaces
161 Interface *ifa=0; 161 Interface *ifa=0;
162 for ( Interface *i=list.first(); i != 0; i=list.next() ){ 162 for ( Interface *i=list.first(); i != 0; i=list.next() ){
163 if (i->getInterfaceName() == interface){ 163 if (i->getInterfaceName() == interface){
164 qDebug("WLANModule found interface %s",interface.latin1()); 164 odebug << "WLANModule found interface " << interface.latin1() << "" << oendl;
165 ifa = i; 165 ifa = i;
166 } 166 }
167 } 167 }
168 168
169 if (ifa == 0){ 169 if (ifa == 0){
170 qDebug("WLANModule Did not find %s",interface.latin1()); 170 odebug << "WLANModule Did not find " << interface.latin1() << "" << oendl;
171 qDebug("skipping"); 171 odebug << "skipping" << oendl;
172 count = 0; 172 count = 0;
173 } 173 }
174 174
@@ -195,9 +195,9 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
195 } 195 }
196 QPEApplication::showWidget( wlanconfigWiget ); 196 QPEApplication::showWidget( wlanconfigWiget );
197 stream >> value; 197 stream >> value;
198 qDebug("WLANModule (build 4) is setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() ); 198 odebug << "WLANModule (build 4) is setting " << action.latin1() << " of " << interface.latin1() << " to " << value.latin1() << "" << oendl;
199 if (value.isEmpty()){ 199 if (value.isEmpty()){
200 qDebug("value is empty!!!\nreturning"); 200 odebug << "value is empty!!!\nreturning" << oendl;
201 return; 201 return;
202 } 202 }
203 if ( action.contains("ESSID") ){ 203 if ( action.contains("ESSID") ){
@@ -218,10 +218,10 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
218 218
219 }else if (action.contains("Channel")){ 219 }else if (action.contains("Channel")){
220 bool ok; 220 bool ok;
221 qDebug("converting channel"); 221 odebug << "converting channel" << oendl;
222 int chan = value.toInt( &ok ); 222 int chan = value.toInt( &ok );
223 if (ok){ 223 if (ok){
224 qDebug("ok setting channel"); 224 odebug << "ok setting channel" << oendl;
225 wlanconfigWiget->specifyChan->setChecked( true ); 225 wlanconfigWiget->specifyChan->setChecked( true );
226 wlanconfigWiget->networkChannel->setValue( chan ); 226 wlanconfigWiget->networkChannel->setValue( chan );
227 } 227 }
@@ -229,27 +229,27 @@ void WLANModule::receive(const QCString &param, const QByteArray &arg)
229 wlanconfigWiget->specifyAp->setChecked( true ); 229 wlanconfigWiget->specifyAp->setChecked( true );
230 wlanconfigWiget->macEdit->setText( value ); 230 wlanconfigWiget->macEdit->setText( value );
231 }else 231 }else
232 qDebug("wlan plugin has no clue"); 232 odebug << "wlan plugin has no clue" << oendl;
233 } 233 }
234 qDebug("next stream"); 234 odebug << "next stream" << oendl;
235 }// while stream 235 }// while stream
236 qDebug("end of stream"); 236 odebug << "end of stream" << oendl;
237 if (toShow) toShow->exec(); 237 if (toShow) toShow->exec();
238 qDebug("returning"); 238 odebug << "returning" << oendl;
239} 239}
240 240
241QWidget *WLANModule::getInfo( Interface *i) 241QWidget *WLANModule::getInfo( Interface *i)
242{ 242{
243 qDebug("WLANModule::getInfo start"); 243 odebug << "WLANModule::getInfo start" << oendl;
244 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); 244 WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose);
245 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); 245 InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i);
246 info->tabWidget->insertTab(information, "TCP/IP", 0); 246 info->tabWidget->insertTab(information, "TCP/IP", 0);
247 info->tabWidget->setCurrentPage( 0 ); 247 info->tabWidget->setCurrentPage( 0 );
248 info->tabWidget->showPage( information ); 248 info->tabWidget->showPage( information );
249 if (info->tabWidget->currentPage() == information ) qDebug("infotab OK"); 249 if (info->tabWidget->currentPage() == information ) odebug << "infotab OK" << oendl;
250 else qDebug("infotab NOT OK"); 250 else odebug << "infotab NOT OK" << oendl;
251 qDebug("current idx %d", info->tabWidget->currentPageIndex()); 251 odebug << "current idx " << info->tabWidget->currentPageIndex() << "" << oendl;
252 qDebug("WLANModule::getInfo return"); 252 odebug << "WLANModule::getInfo return" << oendl;
253 return info; 253 return info;
254} 254}
255 255