diff options
author | Joaquim Rocha <jrocha@endlessm.com> | 2018-08-16 15:30:21 +0200 |
---|---|---|
committer | Joaquim Rocha <jrocha@endlessm.com> | 2018-08-28 17:32:01 +0200 |
commit | 2f7c03fcfd5671c3f08bbf75e40a69dbd0f1fec0 (patch) | |
tree | f7a308e1e725e6511d91c941d3b180191971226a | |
parent | faf10b78e06c1af6f3601a97832708a76b50bbc1 (diff) | |
download | gnome-initial-setup-2f7c03fcfd5671c3f08bbf75e40a69dbd0f1fec0.tar.gz |
network: Don't process APs with unknown SSIDs
When getting access points, if the SSID is unknown (NULL), then it
shouldn't use it for comparison (or consider the AP at all) as a warning
is reported.
-rw-r--r-- | gnome-initial-setup/pages/network/gis-network-page.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnome-initial-setup/pages/network/gis-network-page.c b/gnome-initial-setup/pages/network/gis-network-page.c index 29fc523..5267abf 100644 --- a/gnome-initial-setup/pages/network/gis-network-page.c +++ b/gnome-initial-setup/pages/network/gis-network-page.c @@ -83,13 +83,17 @@ get_strongest_unique_aps (const GPtrArray *aps) ssid = nm_access_point_get_ssid (ap); add_ap = TRUE; + if (!ssid) + continue; + /* get already added list */ for (j = 0; j < unique->len; j++) { ap_tmp = NM_ACCESS_POINT (g_ptr_array_index (unique, j)); ssid_tmp = nm_access_point_get_ssid (ap_tmp); /* is this the same type and data? */ - if (nm_utils_same_ssid (g_bytes_get_data (ssid, NULL), g_bytes_get_size (ssid), + if (ssid_tmp && + nm_utils_same_ssid (g_bytes_get_data (ssid, NULL), g_bytes_get_size (ssid), g_bytes_get_data (ssid_tmp, NULL), g_bytes_get_size (ssid_tmp), TRUE)) { /* the new access point is stronger */ if (nm_access_point_get_strength (ap) > |