diff options
author | James Prestwood <prestwoj@gmail.com> | 2024-01-04 08:00:30 -0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2024-01-04 12:18:40 -0600 |
commit | 407a8a4441781a351a8a431e95a35ff90b2eea64 (patch) | |
tree | 01253135a395996691d54fd62d2fd0d1e4af6728 | |
parent | 705898d1dbf33009be6ef9ff00dc7cb4300638dc (diff) |
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.
-rw-r--r-- | client/ap.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/client/ap.c b/client/ap.c index f444a12cf..3a024d7cd 100644 --- a/client/ap.c +++ b/client/ap.c @@ -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) { struct ap *ap = data; + struct l_dbus_message_iter array; char *value; + char **strv; + if (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; 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) |