linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command
@ 2016-12-22 10:36 Maxime Chevallier
  2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Maxime Chevallier @ 2016-12-22 10:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz, Maxime Chevallier

Fix the interactive "set-security" command in btgatt-client, that would
always fail due to bad initialization of argv buffer :

[GATT client]# set-security 2
Usage: set_security <level>
level: 1-3
e.g.:
        set-sec-level 2
---
 tools/btgatt-client.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/btgatt-client.c b/tools/btgatt-client.c
index 40a03b1..afe00aa 100644
--- a/tools/btgatt-client.c
+++ b/tools/btgatt-client.c
@@ -1198,8 +1198,7 @@ static void set_security_usage(void)
 
 static void cmd_set_security(struct client *cli, char *cmd_str)
 {
-	char *argvbuf[1];
-	char **argv = argvbuf;
+	char *argv[2];
 	int argc = 0;
 	char *endptr = NULL;
 	int level;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-31 10:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-22 10:36 [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Maxime Chevallier
2016-12-22 10:36 ` [PATCH 2/2] tools/btgatt-client: Update set-security usage Maxime Chevallier
2016-12-28  9:14 ` [PATCH 1/2] tools/btgatt-client: Fix set-security interactive command Luiz Augusto von Dentz
2017-01-17  7:05 ` Mallikarjun Phulari
2017-01-17  8:51   ` Maxime CHEVALLIER
     [not found]     ` <1666158258.518353.1485858630674.JavaMail.zimbra@globaledgesoft.com>
2017-01-31 10:30       ` Mallikarjun Phulari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).