author | mickeyl <mickeyl> | 2003-01-04 17:18:59 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-01-04 17:18:59 (UTC) |
commit | 68400748895ca7c54ad312afdfe830150d53a801 (patch) (side-by-side diff) | |
tree | ef9e4c85fb8aac71b613af9766e5ca6c4bd58f51 /noncore/net/wellenreiter/gui | |
parent | 059caec066275d75501471a49c5465fe4def59cf (diff) | |
download | opie-68400748895ca7c54ad312afdfe830150d53a801.zip opie-68400748895ca7c54ad312afdfe830150d53a801.tar.gz opie-68400748895ca7c54ad312afdfe830150d53a801.tar.bz2 |
Try to gracefully shut down the card after sniffing... this is a temporary
hack until the colleagues implement this in libwellenreiter...
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index b22c5cc..4ee9a35 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -113,5 +113,5 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); - button->setEnabled( false ); + // button->setEnabled( false ); netview->setColumnWidthMode( 1, QListView::Manual ); @@ -236,9 +236,26 @@ void Wellenreiter::buttonClicked() system( "killall wellenreiterd" ); - // FIXME: reset the card trying to get into a usable state again + // get configuration from config window - // for now, just message the user + const QString& interface = configwindow->interfaceName->currentText(); + const QString& cardtype = configwindow->deviceType->currentText(); + const QString& interval = configwindow->hopInterval->cleanText(); + + // reset the card trying to get into a usable state again + + QString cmdline; + cmdline.sprintf( "iwpriv %s monitor 1", (const char*) interface ); + system( cmdline ); + cmdline.sprintf( "iwpriv %s monitor 1 6", (const char*) interface ); + system( cmdline ); + cmdline.sprintf( "ifconfig %s -promisc", (const char*) interface ); + system( cmdline ); + cmdline.sprintf( "killall -14 dhcpcd" ); + system( cmdline ); + cmdline.sprintf( "killall -10 udhcpc" ); + + // message the user - QMessageBox::information( this, "Wellenreiter/Opie", "You should reset your\ndevice before using it again." ); + QMessageBox::information( this, "Wellenreiter/Opie", "Your wireless card\nshould now be usable again." ); } @@ -266,5 +283,4 @@ void Wellenreiter::buttonClicked() QString cmdline; - cmdline.sprintf( "iwpriv %s monitor 2", (const char*) interface ); system( cmdline ); |