Allow "tcl_port" to be run after config to simply display the port.
[fw/openocd] / src / server / tcl_server.c
index f3a931ee53266f3e2fd84b879771dbab73594b76..b62f1a37e2c99e584e61020f9a13dd0d53fc9206 100644 (file)
@@ -34,7 +34,7 @@ struct tcl_connection {
        int tc_outerror;/* flag an output error */
 };
 
-static const char *tcl_port;
+static char *tcl_port;
 
 /* handlers */
 static int tcl_new_connection(struct connection *connection);
@@ -176,7 +176,7 @@ static const struct command_registration tcl_command_handlers[] = {
        {
                .name = "tcl_port",
                .handler = handle_tcl_port_command,
-               .mode = COMMAND_CONFIG,
+               .mode = COMMAND_ANY,
                .help = "Specify port on which to listen "
                        "for incoming Tcl syntax.  "
                        "Read help on 'gdb_port'.",