From efe90221979458960618a5a5c8f90b116e91f011 Mon Sep 17 00:00:00 2001 From: Marc Schink Date: Mon, 24 Jun 2024 16:26:46 +0200 Subject: [PATCH] server/telnet: Always allow 'exit' command The telnet 'exit' command is only available in the execution phase of OpenOCD. Thus, a telnet session cannot be closed via 'exit' if OpenOCD is started with 'noinit'. Make the 'exit' command always available. Change-Id: I14447ecde63e579f1c523d606f048ad29cc84a35 Signed-off-by: Marc Schink Reviewed-on: https://review.openocd.org/c/openocd/+/8379 Reviewed-by: Tomas Vanek Tested-by: jenkins --- src/server/telnet_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index 72171cb3f..02d450fbd 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -982,7 +982,7 @@ static const struct command_registration telnet_command_handlers[] = { { .name = "exit", .handler = handle_exit_command, - .mode = COMMAND_EXEC, + .mode = COMMAND_ANY, .usage = "", .help = "exit telnet session", },