Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index db68e5b..67e3940 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -503,25 +503,33 @@ void Wellenreiter::startClicked() | |||
503 | if ( ( interface == "" ) || ( cardtype == 0 ) ) | 503 | if ( ( interface == "" ) || ( cardtype == 0 ) ) |
504 | { | 504 | { |
505 | QMessageBox::information( this, "Wellenreiter II", | 505 | QMessageBox::information( this, "Wellenreiter II", |
506 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); | 506 | tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); |
507 | return; | 507 | return; |
508 | } | 508 | } |
509 | 509 | ||
510 | // configure device | 510 | // configure device |
511 | ONetwork* net = ONetwork::instance(); | 511 | ONetwork* net = ONetwork::instance(); |
512 | 512 | ||
513 | // TODO: check if interface is wireless and support sniffing for non-wireless interfaces | 513 | // TODO: check if interface is wireless and support sniffing for non-wireless interfaces |
514 | 514 | ||
515 | if ( !net->isPresent( interface ) ) | ||
516 | { | ||
517 | QMessageBox::information( this, "Wellenreiter II", | ||
518 | tr( "The configured device (%1)\nis not available on this system\n. Please reconfigure!" ).arg( interface ) ); | ||
519 | return; | ||
520 | } | ||
521 | |||
515 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! | 522 | iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! |
523 | assert( iface ); | ||
516 | 524 | ||
517 | // bring device UP | 525 | // bring device UP |
518 | if ( cardtype != DEVTYPE_FILE ) | 526 | if ( cardtype != DEVTYPE_FILE ) |
519 | { | 527 | { |
520 | iface->setUp( true ); | 528 | iface->setUp( true ); |
521 | if ( !iface->isUp() ) | 529 | if ( !iface->isUp() ) |
522 | { | 530 | { |
523 | QMessageBox::warning( this, "Wellenreiter II", | 531 | QMessageBox::warning( this, "Wellenreiter II", |
524 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); | 532 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); |
525 | return; | 533 | return; |
526 | } | 534 | } |
527 | } | 535 | } |