diff mbox series

client: fix AP PairwiseCiphers parsing

Message ID 20240104160030.614736-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series client: fix AP PairwiseCiphers parsing | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-alpine-ci-makecheckvalgrind fail Make FAIL: monitor/main.c: In function 'open_packet': monitor/main.c:176:17: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration] 176 | close(fd); | ^~~~~ | pclose cc1: all warnings being treated as errors make[1]: *** [Makefile:2572: monitor/main.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1735: all] Error 2
prestwoj/iwd-alpine-ci-makecheck pending makecheck SKIP
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Jan. 4, 2024, 4 p.m. UTC
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(-)

Comments

Denis Kenzior Jan. 4, 2024, 6:19 p.m. UTC | #1
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
diff mbox series

Patch

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)