-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 14f251a..405eda8 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -386,12 +386,14 @@ void Wellenreiter::startClicked() | |||
386 | 386 | ||
387 | // bring device UP | 387 | // bring device UP |
388 | iface->setUp( true ); | 388 | if ( cardtype != DEVTYPE_FILE ) |
389 | if ( !iface->isUp() ) | ||
390 | { | 389 | { |
391 | QMessageBox::warning( this, "Wellenreiter II", | 390 | iface->setUp( true ); |
392 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); | 391 | if ( !iface->isUp() ) |
393 | return; | 392 | { |
393 | QMessageBox::warning( this, "Wellenreiter II", | ||
394 | tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); | ||
395 | return; | ||
396 | } | ||
394 | } | 397 | } |
395 | |||
396 | // set monitor mode | 398 | // set monitor mode |
397 | bool usePrism = configwindow->usePrismHeader(); | 399 | bool usePrism = configwindow->usePrismHeader(); |
@@ -455,6 +457,6 @@ void Wellenreiter::startClicked() | |||
455 | if ( !pcap->isOpen() ) | 457 | if ( !pcap->isOpen() ) |
456 | { | 458 | { |
457 | QMessageBox::warning( this, "Wellenreiter II", | 459 | QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( |
458 | tr( "Can't open packet capturer for '%1':\n" ).arg( iface->name() ) + QString(strerror( errno ) )); | 460 | cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); |
459 | return; | 461 | return; |
460 | } | 462 | } |