aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-25 15:32:51 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-25 15:32:51 (GMT)
commit6207129af48fff67260271c6200e8bf25bf38342 (patch)
treea365feb7efc2fe3a78a08dcefcb8d55bd9d5104a /wpa_supplicant
parenta6f060d7eca9855e0f7cf4208a0d357267af30ee (diff)
downloadhostap-06-6207129af48fff67260271c6200e8bf25bf38342.zip
hostap-06-6207129af48fff67260271c6200e8bf25bf38342.tar.gz
hostap-06-6207129af48fff67260271c6200e8bf25bf38342.tar.bz2
wpa_gui-qt4: Do not about new network adapters unless service is running
Skip the user prompt for adding a new network interface if wpa_gui is not yet connected to wpasvc.
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp5
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index aca98f8..c993a85 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -142,6 +142,7 @@ WpaGui::WpaGui(QWidget *parent, const char *, Qt::WFlags)
else
show();
+ connectedToService = false;
textStatus->setText("connecting to wpa_supplicant");
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), SLOT(ping()));
@@ -293,6 +294,7 @@ int WpaGui::openCtrlConnection(const char *ifname)
ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf,
&len, NULL);
if (ret >= 0) {
+ connectedToService = true;
buf[len] = '\0';
pos = strchr(buf, '\n');
if (pos)
@@ -455,7 +457,8 @@ void WpaGui::updateStatus()
#ifdef CONFIG_NATIVE_WINDOWS
static bool first = true;
- if (first && (ctrl_iface == NULL || *ctrl_iface == '\0')) {
+ if (first && connectedToService &&
+ (ctrl_iface == NULL || *ctrl_iface == '\0')) {
first = false;
if (QMessageBox::information(
this, qAppName(),
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.h b/wpa_supplicant/wpa_gui-qt4/wpagui.h
index 2b14458..1067e42 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.h
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.h
@@ -134,6 +134,8 @@ private:
QAction *addInterfaceAction;
AddInterface *add_iface;
+
+ bool connectedToService;
};
#endif /* WPAGUI_H */