diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-12-16 14:00:04 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-12-16 14:00:04 -0600 |
commit | b7955e0136d06c73ae6e35506c7c40133c488603 (patch) | |
tree | d4d07bbb51874e13f6369dba528ac9ed731d7143 /ui | |
parent | 23c5d80678f45d9fd6c8afb057ba33f0ddc46f9d (diff) | |
download | horizon-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')
-rw-r--r-- | ui/qt5/netsimplewifipage.cc | 7 |
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) { |