aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-11-21 18:52:55 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 19:42:16 (GMT)
commit42a5a6125071e9373bad5d6680dfb53439ecccb4 (patch)
tree9b3b55d35d21b151a35702584e207c787ead94b4
parent08976c8082a625230b28a937bf318b5372b992ce (diff)
downloadhostap-06-42a5a6125071e9373bad5d6680dfb53439ecccb4.zip
hostap-06-42a5a6125071e9373bad5d6680dfb53439ecccb4.tar.gz
hostap-06-42a5a6125071e9373bad5d6680dfb53439ecccb4.tar.bz2
wpa_gui: Only move to WPS tab if inactive/disconnect and AP ready
This removes many of the cases where moving to the WPS tab can be undesired. It is really only useful if we are not currently connected and there is an AP available that would likely be able to provide us network connectivity with use of WPS (active PBC more or selected registrar set). (cherry picked from commit 19019a84a24fd3f1f49ca3296fa24626b403a607)
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index eb5a76b..a3fbf72 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -859,7 +859,9 @@ void WpaGui::processMsg(char *msg)
"Wi-Fi Protected Setup (WPS) AP\n"
"in active PBC mode found.");
wpsStatusText->setText("WPS AP in active PBC mode found");
- wpaguiTab->setCurrentWidget(wpsTab);
+ if (textStatus->text() == "INACTIVE" ||
+ textStatus->text() == "DISCONNECTED")
+ wpaguiTab->setCurrentWidget(wpsTab);
wpsInstructions->setText("Press the PBC button on the screen "
"to start registration");
} else if (str_match(pos, WPS_EVENT_AP_AVAILABLE_PIN)) {
@@ -868,13 +870,14 @@ void WpaGui::processMsg(char *msg)
" in active PIN mode found.");
wpsStatusText->setText("WPS AP with recently selected "
"registrar");
- wpaguiTab->setCurrentWidget(wpsTab);
+ if (textStatus->text() == "INACTIVE" ||
+ textStatus->text() == "DISCONNECTED")
+ wpaguiTab->setCurrentWidget(wpsTab);
} else if (str_match(pos, WPS_EVENT_AP_AVAILABLE)) {
showTrayMessage(QSystemTrayIcon::Information, 3,
"Wi-Fi Protected Setup (WPS)\n"
"AP detected.");
wpsStatusText->setText("WPS AP detected");
- wpaguiTab->setCurrentWidget(wpsTab);
} else if (str_match(pos, WPS_EVENT_OVERLAP)) {
showTrayMessage(QSystemTrayIcon::Information, 3,
"Wi-Fi Protected Setup (WPS)\n"