author | mickeyl <mickeyl> | 2002-12-18 00:00:51 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-18 00:00:51 (UTC) |
commit | 930884a92b064766ed436111778fc55f157c6e1c (patch) (unidiff) | |
tree | d3c4b56b4b50f7cf7ef52cc486b377f39aaab044 | |
parent | 96a9654c2fccce382a4a9ad5d2d0b991b4191468 (diff) | |
download | opie-930884a92b064766ed436111778fc55f157c6e1c.zip opie-930884a92b064766ed436111778fc55f157c6e1c.tar.gz opie-930884a92b064766ed436111778fc55f157c6e1c.tar.bz2 |
use system() to start daemon and hopper instead of Global::execute,
which makes nothing but trouble for non-gui processes.
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 764ef34..0e95b28 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -253,15 +253,25 @@ void Wellenreiter::buttonClicked() | |||
253 | logwindow->log( "(i) Daemon has been stopped." ); | 253 | logwindow->log( "(i) Daemon has been stopped." ); |
254 | button->setText( "Start Scanning" ); | 254 | button->setText( "Start Scanning" ); |
255 | 255 | ||
256 | // Stop daemon | 256 | // Stop daemon - ugly for now... later better |
257 | 257 | ||
258 | // find out pids of wellenreiterd and orinoco_hopper | 258 | system( "killall orinoco_hopper" ); |
259 | system( "killall wellenreiterd" ); | ||
259 | 260 | ||
261 | // FIXME: reset the card trying to get into a usable state again | ||
262 | |||
263 | // for now, just message the user | ||
264 | |||
265 | QMessageBox::information( this, "Wellenreiter/Opie", "You should reset your\ndevice before using it again." ); | ||
260 | } | 266 | } |
261 | 267 | ||
262 | else | 268 | else |
263 | { | 269 | { |
264 | 270 | ||
271 | logwindow->log( "(i) Daemon has been started." ); | ||
272 | daemonRunning = true; | ||
273 | button->setText( "Stop Scanning" ); | ||
274 | |||
265 | // get configuration from config window | 275 | // get configuration from config window |
266 | 276 | ||
267 | const QString& interface = configwindow->interfaceName->currentText(); | 277 | const QString& interface = configwindow->interfaceName->currentText(); |
@@ -274,12 +284,8 @@ void Wellenreiter::buttonClicked() | |||
274 | return; | 284 | return; |
275 | } | 285 | } |
276 | 286 | ||
277 | logwindow->log( "(i) Daemon has been started." ); | ||
278 | button->setText( "Stop Scanning" ); | ||
279 | |||
280 | #ifdef QWS | ||
281 | |||
282 | // set interface into monitor mode | 287 | // set interface into monitor mode |
288 | /* Global::Execute definitely does not work very well with non-gui stuff! :( */ | ||
283 | 289 | ||
284 | QString cmdline; | 290 | QString cmdline; |
285 | 291 | ||
@@ -294,17 +300,21 @@ void Wellenreiter::buttonClicked() | |||
294 | cmdline += interface; | 300 | cmdline += interface; |
295 | cmdline += " -i "; | 301 | cmdline += " -i "; |
296 | cmdline += interval; | 302 | cmdline += interval; |
297 | //qDebug( "execute: %s", (const char*) cmdline ); | 303 | cmdline += " &"; |
298 | Global::execute( cmdline ); | 304 | qDebug( "execute: %s", (const char*) cmdline ); |
305 | system( cmdline ); | ||
306 | qDebug( "done" ); | ||
299 | 307 | ||
300 | // start daemon | 308 | // start daemon |
301 | 309 | ||
302 | cmdline = "wellenreiterd "; | 310 | cmdline = "wellenreiterd "; |
303 | cmdline += interface; | 311 | cmdline += interface; |
304 | cmdline += " 3"; | 312 | cmdline += " 3"; |
305 | //qDebug( "execute: %s", (const char*) cmdline ); | 313 | cmdline += " &"; |
306 | Global::execute( cmdline ); | 314 | |
307 | #endif | 315 | qDebug( "execute: %s", (const char*) cmdline ); |
316 | system( cmdline ); | ||
317 | qDebug( "done" ); | ||
308 | 318 | ||
309 | /* | 319 | /* |
310 | 320 | ||