summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-10-03 13:44:35 (UTC)
committer mickeyl <mickeyl>2003-10-03 13:44:35 (UTC)
commit120b0fe68c1352ba03ad6e73d26bcbe8452ef6ed (patch) (unidiff)
tree253c82439683b8fc2352de0859c92671568fdaff
parent9450f41ce6109fb9d22fca7b1c72c606fd37f5a7 (diff)
downloadopie-120b0fe68c1352ba03ad6e73d26bcbe8452ef6ed.zip
opie-120b0fe68c1352ba03ad6e73d26bcbe8452ef6ed.tar.gz
opie-120b0fe68c1352ba03ad6e73d26bcbe8452ef6ed.tar.bz2
fix a few SIGSEGVs related to not checking the value of iface, if we
are capturing from a file (DEVTYPE_FILE)
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp8
1 files changed, 5 insertions, 3 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
@@ -385,6 +385,8 @@ void Wellenreiter::startClicked()
385 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! 385 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless!
386 386
387 // bring device UP 387 // bring device UP
388 if ( cardtype != DEVTYPE_FILE )
389 {
388 iface->setUp( true ); 390 iface->setUp( true );
389 if ( !iface->isUp() ) 391 if ( !iface->isUp() )
390 { 392 {
@@ -392,7 +394,7 @@ void Wellenreiter::startClicked()
392 tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); 394 tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) );
393 return; 395 return;
394 } 396 }
395 397 }
396 // set monitor mode 398 // set monitor mode
397 bool usePrism = configwindow->usePrismHeader(); 399 bool usePrism = configwindow->usePrismHeader();
398 400
@@ -454,8 +456,8 @@ void Wellenreiter::startClicked()
454 456
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 }
461 463