* [PATCH] client: fix AP PairwiseCiphers parsing
@ 2024-01-04 16:00 James Prestwood
2024-01-04 18:19 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2024-01-04 16:00 UTC (permalink / raw)
To: iwd; +Cc: James Prestwood
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] client: fix AP PairwiseCiphers parsing
2024-01-04 16:00 [PATCH] client: fix AP PairwiseCiphers parsing James Prestwood
@ 2024-01-04 18:19 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2024-01-04 18:19 UTC (permalink / raw)
To: James Prestwood, iwd
Hi James,
On 1/4/24 10:00, James Prestwood wrote:
> 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(-)
>
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-04 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 16:00 [PATCH] client: fix AP PairwiseCiphers parsing James Prestwood
2024-01-04 18:19 ` Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox