From: Johan Hedberg <johan.hedberg@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] mesh: Make meshctl use bt_shell helpers
Date: Tue, 5 Dec 2017 13:14:06 +0200 [thread overview]
Message-ID: <20171205111406.GA8010@x1c.lan> (raw)
In-Reply-To: <20171205105718.5832-1-luiz.dentz@gmail.com>
Hi Luiz,
On Tue, Dec 05, 2017, Luiz Augusto von Dentz wrote:
> -static void cmd_connect(const char *arg)
> +static void cmd_connect(int argc, char *argv[])
> {
> + char *filters[] = { MESH_PROXY_SVC_UUID };
> +
> if (check_default_ctrl() == FALSE)
> return;
>
> memset(&connection, 0, sizeof(connection));
>
> - if (!arg || !strlen(arg)) {
> + if (!argc || !strlen(argv[0])) {
> connection.net_idx = NET_IDX_PRIMARY;
> } else {
> char *end;
> - connection.net_idx = strtol(arg, &end, 16);
> - if (end == arg) {
> + connection.net_idx = strtol(argv[0], &end, 16);
> + if (end == argv[0]) {
> connection.net_idx = NET_IDX_INVALID;
> - rl_printf("Invalid network index %s\n", arg);
> + bt_shell_printf("Invalid network index %s\n", argv[0]);
> return;
> }
This looks like it's breaking the Node ID connecting that was just
added. That code from Steve was taking advantage of the "end" pointer to
get the next parameter, however now that you get the full parsed argv
the connection.unicast should be set based on argv[1].
Johan
next prev parent reply other threads:[~2017-12-05 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 10:57 [PATCH BlueZ] mesh: Make meshctl use bt_shell helpers Luiz Augusto von Dentz
2017-12-05 11:14 ` Johan Hedberg [this message]
2017-12-05 11:17 ` Luiz Augusto von Dentz
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=20171205111406.GA8010@x1c.lan \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.