Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanimp2.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanimp2.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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 | |||
51 | 51 | ||
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() ) ); |
59 | connect( netView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( selectNetwork(QListViewItem*) ) ); | 59 | connect( netView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( selectNetwork(QListViewItem*) ) ); |
@@ -232,9 +232,9 @@ void WLANImp::writeOpts() { | |||
232 | return; | 232 | return; |
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 | ||
240 | interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); | 240 | interfaces->setInterfaceOption(QString("wireless_mode"), mode->currentText()); |
@@ -306,9 +306,9 @@ void WLANImp::writeOpts() { | |||
306 | 306 | ||
307 | void WLANImp::rescanNeighbourhood() | 307 | void 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 ); |
314 | 314 | ||
@@ -329,14 +329,14 @@ void WLANImp::rescanNeighbourhood() | |||
329 | } | 329 | } |
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 |
342 | 342 | ||
@@ -348,25 +348,25 @@ void WLANImp::rescanNeighbourhood() | |||
348 | else if ( devicetype == "wlan-ng" ) wiface->setMonitoring( new OWlanNGMonitoringInterface( wiface, false ) ); | 348 | else if ( devicetype == "wlan-ng" ) wiface->setMonitoring( new OWlanNGMonitoringInterface( wiface, false ) ); |
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 | ||
363 | // open a packet capturer | 363 | // open a packet capturer |
364 | OPacketCapturer* cap = new OPacketCapturer(); | 364 | OPacketCapturer* cap = new OPacketCapturer(); |
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 | ||
372 | // display splash screen | 372 | // display splash screen |
@@ -397,17 +397,17 @@ void WLANImp::rescanNeighbourhood() | |||
397 | { | 397 | { |
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 | } |
413 | 413 | ||
@@ -438,9 +438,9 @@ void WLANImp::handlePacket( OPacket* p ) | |||
438 | type = "managed"; | 438 | type = "managed"; |
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 | ||
446 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); | 446 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |