From: Roy Marples Date: Tue, 2 Dec 2014 10:30:01 +0000 (+0000) Subject: As we merge BSSIDs with matching SSIDs into one, we have to compare X-Git-Tag: dhcpcd-ui-0.7.5~15 X-Git-Url: https://roy.marples.name/git As we merge BSSIDs with matching SSIDs into one, we have to compare on SSID and not BSSID. --- diff --git a/src/dhcpcd-gtk/menu.c b/src/dhcpcd-gtk/menu.c index 23532d2..0300b20 100644 --- a/src/dhcpcd-gtk/menu.c +++ b/src/dhcpcd-gtk/menu.c @@ -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; diff --git a/src/dhcpcd-qt/dhcpcd-wi.cpp b/src/dhcpcd-qt/dhcpcd-wi.cpp index 6800915..69988d3 100644 --- a/src/dhcpcd-qt/dhcpcd-wi.cpp +++ b/src/dhcpcd-qt/dhcpcd-wi.cpp @@ -99,8 +99,8 @@ bool DhcpcdWi::setScans(DHCPCD_WI_SCAN *scans) lst = menu->findChildren(); 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) {