From: Denis Kenzior <denkenz@gmail.com>
To: James Prestwood <prestwoj@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 3/3] client: add client commands for shared code configuration
Date: Thu, 9 Nov 2023 20:31:55 -0600 [thread overview]
Message-ID: <0df290a1-50ba-4906-b4ae-be2d4b2675be@gmail.com> (raw)
In-Reply-To: <20231109184926.52629-3-prestwoj@gmail.com>
Hi James,
On 11/9/23 12:49, James Prestwood wrote:
> The StartConfigurator() call was left out since there would be no
> functional difference to the user in iwctl. Its expected that
> human users of the shared code API provide the code/id ahead of
> time, i.e. use ConfigureEnrollee/StartEnrollee.
> ---
> Makefile.am | 3 +-
> client/dpp-pkex.c | 342 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 344 insertions(+), 1 deletion(-)
> create mode 100644 client/dpp-pkex.c
>
<snip>
> diff --git a/client/dpp-pkex.c b/client/dpp-pkex.c
> new file mode 100644
> index 00000000..7a6934e1
> --- /dev/null
> +++ b/client/dpp-pkex.c
> @@ -0,0 +1,342 @@
> +/*
> + *
> + * Wireless daemon for Linux
> + *
> + * Copyright (C) 2023 Intel Corporation. All rights reserved.
> + *
This looks incorrect. Copy-paste?
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + *
> + */
> +
<snip>
> +static enum cmd_status cmd_enroll_or_configure(const char *device_name,
> + char **argv, int argc,
> + const char *method)
> +{
> + struct l_dbus_message_builder *builder;
> + const struct proxy_interface *pkex;
> + const char *key;
> + const char *id = NULL;
> +
> + pkex = device_proxy_find(device_name, IWD_DPP_PKEX_INTERFACE);
> + if (!pkex) {
> + display("No pkex pkex on device: '%s'\n", device_name);
> + return CMD_STATUS_INVALID_VALUE;
> + }
> +
> + if (argc < 1)
> + return CMD_STATUS_INVALID_ARGS;
> +
> + key = argv[0];
> +
> + if (argc > 1)
> + id = argv[1];
> +
> + builder = proxy_interface_new_builder(pkex, method);
> +
> + l_dbus_message_builder_enter_array(builder, "{sv}");
> +
> + append_dict_basic(builder, "Code", 's', key);
> +
> + if (id)
> + append_dict_basic(builder, "Identifier", 's', id);
> +
> + l_dbus_message_builder_leave_array(builder);
This can all be done as:
l_dbus_message_set_arguments(msg, "a{sv}", 2,
"Code", "s", key,
"Identifier", "s", id);
> +
> + proxy_interface_method_call_from_builder(pkex, builder,
> + check_errors_method_callback);
> + l_dbus_message_builder_destroy(builder);
> +
> + return CMD_STATUS_TRIGGERED;
> +}
> +
Regards,
-Denis
next prev parent reply other threads:[~2023-11-10 2:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 18:49 [PATCH 1/3] client: Add shared code DBus interface James Prestwood
2023-11-09 18:49 ` [PATCH 2/3] client: add helper to call method via builder James Prestwood
2023-11-10 2:22 ` Denis Kenzior
2023-11-10 12:28 ` James Prestwood
2023-11-10 12:59 ` James Prestwood
2023-11-09 18:49 ` [PATCH 3/3] client: add client commands for shared code configuration James Prestwood
2023-11-10 2:31 ` Denis Kenzior [this message]
2023-11-10 2:17 ` [PATCH 1/3] client: Add shared code DBus interface 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=0df290a1-50ba-4906-b4ae-be2d4b2675be@gmail.com \
--to=denkenz@gmail.com \
--cc=iwd@lists.linux.dev \
--cc=prestwoj@gmail.com \
/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