Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 448b52b..79734a2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -492,22 +492,31 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa | |||
492 | } | 492 | } |
493 | 493 | ||
494 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) | 494 | void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr) |
495 | { | 495 | { |
496 | // we need the interface too: | 496 | if ( !iface ) |
497 | const QString iface = "wlan0"; | 497 | { |
498 | qDebug( "joinNetwork() - %s, %s, %d, %s", | 498 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) ); |
499 | return; | ||
500 | } | ||
501 | |||
502 | if ( sniffing ) | ||
503 | { | ||
504 | QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) ); | ||
505 | return; | ||
506 | } | ||
507 | |||
508 | qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s", | ||
509 | (const char*) iface->name(), | ||
499 | (const char*) type, | 510 | (const char*) type, |
500 | (const char*) essid, | 511 | (const char*) essid, |
501 | channel, | 512 | channel, |
502 | (const char*) macaddr ); | 513 | (const char*) macaddr ); |
503 | 514 | ||
504 | // TODO: Stop scanning here | ||
505 | |||
506 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); | 515 | QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); |
507 | msg << iface << QString("Mode") << type; | 516 | msg << iface->name() << QString("Mode") << type; |
508 | msg << iface << QString("ESSID") << essid; | 517 | msg << iface->name() << QString("ESSID") << essid; |
509 | msg << iface << QString("Channel") << channel; | 518 | msg << iface->name() << QString("Channel") << channel; |
510 | msg << iface << QString("MacAddr") << macaddr; | 519 | msg << iface->name() << QString("MacAddr") << macaddr; |
511 | 520 | ||
512 | } | 521 | } |
513 | 522 | ||