ui: Don't notify new scan results if ANY interface is connected
[dhcpcd-ui] / src / dhcpcd-gtk / main.c
index 6444bf8ffefbdd665043faffa8cb32185bd5a4e4..bc45a28c1482cf6e524f4375103142d234940f19 100644 (file)
@@ -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;