mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 18:08:05 +02:00
cli: fix setting SSID property in the editor
SSID is now GBytes, not GByteArray.
This commit is contained in:
parent
e7666a8532
commit
0fa6e75b14
1 changed files with 4 additions and 5 deletions
|
|
@ -2176,7 +2176,7 @@ nmc_property_set_bool (NMSetting *setting, const char *prop, const char *val, GE
|
|||
static gboolean
|
||||
nmc_property_set_ssid (NMSetting *setting, const char *prop, const char *val, GError **error)
|
||||
{
|
||||
GByteArray *ssid_arr;
|
||||
GBytes *ssid;
|
||||
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
|
|
@ -2185,10 +2185,9 @@ nmc_property_set_ssid (NMSetting *setting, const char *prop, const char *val, GE
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
ssid_arr = g_byte_array_sized_new (strlen (val));
|
||||
g_byte_array_append (ssid_arr, (const guint8 *) val, strlen (val));
|
||||
g_object_set (setting, prop, ssid_arr, NULL);
|
||||
|
||||
ssid = g_bytes_new (val, strlen (val));
|
||||
g_object_set (setting, prop, ssid, NULL);
|
||||
g_bytes_unref (ssid);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue