3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

client: fix AP PairwiseCiphers parsing

This property was being parsed as "s" when it should be "as". This
results in "ap <wlan> show" having an empty entry for the
PairwiseCiphers list.
This commit is contained in:
James Prestwood 2024-01-04 08:00:30 -08:00 committed by Denis Kenzior
parent 705898d1db
commit 407a8a4441

View File

@ -162,18 +162,27 @@ static const char *get_freq_tostr(const void *data)
static void update_pairwise(void *data, struct l_dbus_message_iter *variant) static void update_pairwise(void *data, struct l_dbus_message_iter *variant)
{ {
struct ap *ap = data; struct ap *ap = data;
struct l_dbus_message_iter array;
char *value; char *value;
char **strv;
if (ap->pairwise) if (ap->pairwise)
l_free(ap->pairwise); l_free(ap->pairwise);
if (!l_dbus_message_iter_get_variant(variant, "s", &value)) { if (!l_dbus_message_iter_get_variant(variant, "as", &array)) {
ap->pairwise = NULL; ap->pairwise = NULL;
return; return;
} }
ap->pairwise = l_strdup(value); strv = l_strv_new();
while (l_dbus_message_iter_next_entry(&array, &value))
strv = l_strv_append(strv, value);
ap->pairwise = l_strjoinv(strv, ' ');
l_strv_free(strv);
} }
static const char *get_pairwise_tostr(const void *data) static const char *get_pairwise_tostr(const void *data)