public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] shared/shell: Fix not dequeueing command
@ 2026-01-26 14:47 Luiz Augusto von Dentz
  2026-01-26 15:43 ` [BlueZ,v1] " bluez.test.bot
  2026-01-26 17:50 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2026-01-26 14:47 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If script execution started with command that call
bt_shell_noninteractive_quit directly it wouldn't execute the next
command since data.line wouldn't be set.
---
 src/shared/shell.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/shared/shell.c b/src/shared/shell.c
index 15f21efef61a..f014d8f7c2b2 100644
--- a/src/shared/shell.c
+++ b/src/shared/shell.c
@@ -269,8 +269,6 @@ static void cmd_export(int argc, char *argv[])
 
 static int bt_shell_queue_exec(char *line)
 {
-	int err;
-
 	/* Ignore comments */
 	if (line[0] == '#')
 		return 0;
@@ -288,12 +286,9 @@ static int bt_shell_queue_exec(char *line)
 	}
 
 	bt_shell_printf("%s\n", line);
+	data.line = strdup(line);
 
-	err = bt_shell_exec(line);
-	if (!err)
-		data.line = strdup(line);
-
-	return err;
+	return bt_shell_exec(line);
 }
 
 static bool bt_shell_input_line(struct input *input)
-- 
2.52.0


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

end of thread, other threads:[~2026-01-26 17:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26 14:47 [PATCH BlueZ v1] shared/shell: Fix not dequeueing command Luiz Augusto von Dentz
2026-01-26 15:43 ` [BlueZ,v1] " bluez.test.bot
2026-01-26 17:50 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox