mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 05:20:08 +01:00
iwd: don't call nm_wifi_ap_set_ssid for empty SSID
If SSID is an empty string there's no need to call nm_wifi_ap_set_ssid as it won't do anything. It also has an assert checking that NULL is passed for an empty SSID and we were passing a non-NULL pointer.
This commit is contained in:
parent
8435aa8b31
commit
29e9d206aa
1 changed files with 2 additions and 1 deletions
|
|
@ -334,7 +334,8 @@ get_ordered_networks_cb (GObject *source, GAsyncResult *res, gpointer user_data)
|
|||
props = g_variant_new ("a{sv}", &builder);
|
||||
|
||||
ap = nm_wifi_ap_new_from_properties (path, props);
|
||||
nm_wifi_ap_set_ssid (ap, (const guint8 *) name, strlen (name));
|
||||
if (name[0] != '\0')
|
||||
nm_wifi_ap_set_ssid (ap, (const guint8 *) name, strlen (name));
|
||||
nm_wifi_ap_set_strength (ap, nm_wifi_utils_level_to_quality (signal / 100));
|
||||
nm_wifi_ap_set_freq (ap, 2417);
|
||||
nm_wifi_ap_set_max_bitrate (ap, 65000);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue