From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH] client: fix AP PairwiseCiphers parsing
Date: Thu, 4 Jan 2024 08:00:30 -0800 [thread overview]
Message-ID: <20240104160030.614736-1-prestwoj@gmail.com> (raw)
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.
---
client/ap.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/client/ap.c b/client/ap.c
index f444a12c..3a024d7c 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)
--
2.34.1
next reply other threads:[~2024-01-04 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 16:00 James Prestwood [this message]
2024-01-04 18:19 ` [PATCH] client: fix AP PairwiseCiphers parsing Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240104160030.614736-1-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox