[PATCH BlueZ] client: Fix settingof advertisement interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This fixes incorrect argument read when using "interval" command
in "advertisement" submenu
---
 client/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/main.c b/client/main.c
index ccbfc620b..1df94f000 100644
--- a/client/main.c
+++ b/client/main.c
@@ -2768,7 +2768,7 @@ static void cmd_advertise_interval(int argc, char *argv[])
 	max = min;
 
 	if (argc > 2) {
-		max = strtol(argv[1], &endptr, 0);
+		max = strtol(argv[2], &endptr, 0);
 		if (!endptr || *endptr != '\0' || max < 20 || max > 10485) {
 			bt_shell_printf("Invalid argument\n");
 			return bt_shell_noninteractive_quit(EXIT_FAILURE);
-- 
2.35.3




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux