diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-16 19:37:38 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-16 19:37:38 -0600 |
commit | 8772c7b20f2d1d102392511fa81d67c905ea2eb0 (patch) | |
tree | 840038e0c9086a4ede33fbfeb947c78049007bec /ui/qt5 | |
parent | 8add82ed2122c26649d1b8fcd2ed13f98cc7be32 (diff) | |
download | horizon-8772c7b20f2d1d102392511fa81d67c905ea2eb0.tar.gz horizon-8772c7b20f2d1d102392511fa81d67c905ea2eb0.tar.bz2 horizon-8772c7b20f2d1d102392511fa81d67c905ea2eb0.tar.xz horizon-8772c7b20f2d1d102392511fa81d67c905ea2eb0.zip |
Qt UI: Provide correct path to WPA Supplicant socket
Diffstat (limited to 'ui/qt5')
-rw-r--r-- | ui/qt5/netsimplewifipage.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/qt5/netsimplewifipage.cc b/ui/qt5/netsimplewifipage.cc index 00f25ca..e3c2eb9 100644 --- a/ui/qt5/netsimplewifipage.cc +++ b/ui/qt5/netsimplewifipage.cc @@ -35,21 +35,14 @@ NetworkSimpleWirelessPage::NetworkSimpleWirelessPage(QWidget *parent) rescanButton = new QPushButton(tr("&Rescan Networks")); connect(rescanButton, &QPushButton::clicked, [=](void) { doScan(); }); -#ifdef HAS_INSTALL_ENV - tain_now_g(); - if(!wpactrl_start_g(&control, "/var/run/wpa_supplicant", 2000)) { - rescanButton->setEnabled(false); - statusLabel->setText(tr("Couldn't communicate with wireless subsystem.")); - } - notify = nullptr; -#endif /* HAS_INSTALL_ENV */ - ssidListView = new QListWidget; +#ifdef HAS_INSTALL_ENV exchange_item = { .filter = "CTRL-EVENT-SCAN-RESULTS", .cb = &scanResults }; +#endif /* HAS_INSTALL_ENV */ passphrase = new QLineEdit(this); passphrase->setEchoMode(QLineEdit::Password); @@ -85,6 +78,14 @@ void NetworkSimpleWirelessPage::doScan() { tain_t deadline; wparesponse_t response; + std::string suppsock = "/var/run/wpa_supplicant/" + + horizonWizard()->chosen_auto_iface; + + tain_now_g(); + if(!wpactrl_start_g(&control, suppsock.c_str(), 2000)) { + rescanButton->setEnabled(false); + statusLabel->setText(tr("Couldn't communicate with wireless subsystem.")); + } response = wpactrl_command_g(&control, "SCAN"); if(response != WPA_OK && response != WPA_FAILBUSY) { |