ui: Don't notify new scan results if ANY interface is connected
[dhcpcd-ui] / src / dhcpcd-qt / dhcpcd-qt.cpp
index bfc72e1a0a5c399d53e9bf3dd24c0a15ef87629a..3730c2a9b90604ed85b1a127018f343805c037b4 100644 (file)
@@ -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;