diff options
| author | Roy Marples <roy@marples.name> | 2020-08-04 03:41:29 +0100 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-08-04 03:41:29 +0100 |
| commit | 9851e0a9a411afa60fd14c14dca6db4f150669de (patch) | |
| tree | e99f540656c7f2f682dae82f9d697ffdfe3bf891 | |
| parent | 9f76cb7b16aa985adc42d0b604ebac0f0d0d92fd (diff) | |
| download | dhcpcd-ui-9851e0a9a411afa60fd14c14dca6db4f150669de.tar.xz | |
ui: Don't notify new scan results if ANY interface is connected
We don't want to be spammed if wired is connected and wireless isn't.
| -rw-r--r-- | src/dhcpcd-gtk/main.c | 4 | ||||
| -rw-r--r-- | src/dhcpcd-qt/dhcpcd-qt.cpp | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/dhcpcd-gtk/main.c b/src/dhcpcd-gtk/main.c index 6444bf8..bc45a28 100644 --- a/src/dhcpcd-gtk/main.c +++ b/src/dhcpcd-gtk/main.c @@ -620,7 +620,9 @@ dhcpcd_wpa_scan_cb(DHCPCD_WPA *wpa, _unused void *data) TAILQ_INIT(&w->menus); TAILQ_INSERT_TAIL(&wi_scans, w, next); } else { - if (!i->up) { + DHCPCD_CONNECTION *con = dhcpcd_if_connection(i); + + if (dhcpcd_status(con, NULL) != DHC_CONNECTED) { char *txt, *t; txt = NULL; diff --git a/src/dhcpcd-qt/dhcpcd-qt.cpp b/src/dhcpcd-qt/dhcpcd-qt.cpp index bfc72e1..3730c2a 100644 --- a/src/dhcpcd-qt/dhcpcd-qt.cpp +++ b/src/dhcpcd-qt/dhcpcd-qt.cpp @@ -368,12 +368,9 @@ DhcpcdWi *DhcpcdQt::findWi(DHCPCD_WPA *wpa) void DhcpcdQt::processScans(DhcpcdWi *wi, DHCPCD_WI_SCAN *scans) { - DHCPCD_IF *i; /* Don't spam the user if we're already connected. */ - i = dhcpcd_wpa_if(wi->getWpa()); - - if (!i->up) { + if (lastStatus != DHC_CONNECTED) { QString title = tr("New Access Point"); QString txt; DHCPCD_WI_SCAN *s1, *s2; |
