summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-10-03 13:44:35 (UTC)
committer mickeyl <mickeyl>2003-10-03 13:44:35 (UTC)
commit120b0fe68c1352ba03ad6e73d26bcbe8452ef6ed (patch) (side-by-side diff)
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) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp18
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
@@ -387,10 +387,12 @@ void Wellenreiter::startClicked()
// bring device UP
- iface->setUp( true );
- if ( !iface->isUp() )
+ if ( cardtype != DEVTYPE_FILE )
{
- QMessageBox::warning( this, "Wellenreiter II",
- tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) );
- return;
+ iface->setUp( true );
+ if ( !iface->isUp() )
+ {
+ QMessageBox::warning( this, "Wellenreiter II",
+ tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) );
+ return;
+ }
}
-
// set monitor mode
@@ -456,4 +458,4 @@ void Wellenreiter::startClicked()
{
- QMessageBox::warning( this, "Wellenreiter II",
- tr( "Can't open packet capturer for '%1':\n" ).arg( iface->name() ) + QString(strerror( errno ) ));
+ QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg(
+ cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) ));
return;