As we merge BSSIDs with matching SSIDs into one, we have to compare
authorRoy Marples <roy@marples.name>
Tue, 2 Dec 2014 10:30:01 +0000 (10:30 +0000)
committerRoy Marples <roy@marples.name>
Tue, 2 Dec 2014 10:30:01 +0000 (10:30 +0000)
on SSID and not BSSID.

src/dhcpcd-gtk/menu.c
src/dhcpcd-qt/dhcpcd-wi.cpp

index 23532d2782be6d68ff45c9783b5d606c26560e58..0300b20ef2338c0d5f94b8f8c16afe11427a17e5 100644 (file)
@@ -226,8 +226,8 @@ menu_update_scans(WI_SCAN *wi, DHCPCD_WI_SCAN *scans)
        TAILQ_FOREACH_SAFE(wim, &wi->menus, next, win) {
                found = false;
                for (s = scans; s; s = s->next) {
-                       if (memcmp(wim->scan->bssid, s->bssid,
-                           sizeof(s->bssid)) == 0)
+                       if (memcmp(wim->scan->ssid, s->ssid,
+                           sizeof(s->ssid)) == 0)
                        {
                                found = true;
                                update_item(wi, wim, s);
@@ -244,8 +244,8 @@ menu_update_scans(WI_SCAN *wi, DHCPCD_WI_SCAN *scans)
                found = false;
                position = 0;
                TAILQ_FOREACH(wim, &wi->menus, next) {
-                       if (memcmp(wim->scan->bssid, s->bssid,
-                           sizeof(s->bssid)) == 0)
+                       if (memcmp(wim->scan->ssid, s->ssid,
+                           sizeof(s->ssid)) == 0)
                        {
                                found = true;
                                break;
index 680091575832422389530df291cbebb9a922e179..69988d3ec87464998d64cd19693e07abd2b1521a 100644 (file)
@@ -99,8 +99,8 @@ bool DhcpcdWi::setScans(DHCPCD_WI_SCAN *scans)
                        lst = menu->findChildren<DhcpcdSsidMenu*>();
                        foreach(DhcpcdSsidMenu *sm, lst) {
                                DHCPCD_WI_SCAN *s = sm->getScan();
-                               if (memcmp(scan->bssid, s->bssid,
-                                   sizeof(scan->bssid)) == 0)
+                               if (memcmp(scan->ssid, s->ssid,
+                                   sizeof(scan->ssid)) == 0)
                                {
                                        sm->setScan(scan);
                                        found = true;
@@ -120,8 +120,8 @@ bool DhcpcdWi::setScans(DHCPCD_WI_SCAN *scans)
                foreach(DhcpcdSsidMenu *sm, lst) {
                        DHCPCD_WI_SCAN *s = sm->getScan();
                        for (scan = scans; scan; scan = scan->next) {
-                               if (memcmp(scan->bssid, s->bssid,
-                                   sizeof(scan->bssid)) == 0)
+                               if (memcmp(scan->ssid, s->ssid,
+                                   sizeof(scan->ssid)) == 0)
                                        break;
                        }
                        if (scan == NULL) {