summaryrefslogtreecommitdiff
path: root/ui/qt5/netsimplewifipage.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-16 14:00:04 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-16 14:00:04 -0600
commitb7955e0136d06c73ae6e35506c7c40133c488603 (patch)
treed4d07bbb51874e13f6369dba528ac9ed731d7143 /ui/qt5/netsimplewifipage.cc
parent23c5d80678f45d9fd6c8afb057ba33f0ddc46f9d (diff)
downloadhorizon-b7955e0136d06c73ae6e35506c7c40133c488603.tar.gz
horizon-b7955e0136d06c73ae6e35506c7c40133c488603.tar.bz2
horizon-b7955e0136d06c73ae6e35506c7c40133c488603.tar.xz
horizon-b7955e0136d06c73ae6e35506c7c40133c488603.zip
Qt UI: Move filtering in the proper place
We restart wpactrl every time we do a new scan (for some reason?), so we need to add the filters when we attempt to join or else they won't be there.
Diffstat (limited to 'ui/qt5/netsimplewifipage.cc')
-rw-r--r--ui/qt5/netsimplewifipage.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/qt5/netsimplewifipage.cc b/ui/qt5/netsimplewifipage.cc
index b9dc3f1..15de6f1 100644
--- a/ui/qt5/netsimplewifipage.cc
+++ b/ui/qt5/netsimplewifipage.cc
@@ -50,9 +50,6 @@ NetworkSimpleWirelessPage::NetworkSimpleWirelessPage(QWidget *parent)
#ifdef HAS_INSTALL_ENV
exchange_item.filter = "CTRL-EVENT-SCAN-RESULTS";
exchange_item.cb = &scanResults;
- wpactrl_filter_add(&control, "CTRL-EVENT-ASSOC-REJECT");
- wpactrl_filter_add(&control, "CTRL-EVENT-AUTH-REJECT");
- wpactrl_filter_add(&control, "CTRL-EVENT-CONNECTED");
notify = nullptr;
connNotify = nullptr;
dialog = nullptr;
@@ -333,6 +330,10 @@ bool NetworkSimpleWirelessPage::validatePage() {
connNotify = nullptr;
}
+ wpactrl_filter_add(&control, "CTRL-EVENT-ASSOC-REJECT");
+ wpactrl_filter_add(&control, "CTRL-EVENT-AUTH-REJECT");
+ wpactrl_filter_add(&control, "CTRL-EVENT-CONNECTED");
+
connNotify = new QSocketNotifier(wpactrl_fd(&control), QSocketNotifier::Read, this);
connect(connNotify, &QSocketNotifier::activated, [=](int) {
if(wpactrl_update(&control) < 0) {