Fixed bug in tcl-server
authorMatthias Bode <papabaer.embedded@googlemail.com>
Mon, 3 May 2010 20:35:38 +0000 (22:35 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 5 May 2010 13:24:24 +0000 (15:24 +0200)
No segmentationfault when sending commands to tcl-server.

modified:   src/server/server.c
modified:   src/server/tcl_server.c
modified:   src/server/tcl_server.h

src/server/server.c
src/server/tcl_server.c
src/server/tcl_server.h

index 0d3273b3b6f741d3e22e8cd4df92e8bc271052e5..7e57228b091155f084ba47dcfa0c20a93280e4c8 100644 (file)
@@ -513,7 +513,7 @@ int server_preinit(void)
 
 int server_init(struct command_context *cmd_ctx)
 {
-       int ret = tcl_init(cmd_ctx);
+       int ret = tcl_init();
        if (ERROR_OK != ret)
                return ret;
 
index a88c4365268f613b06ee63e7734bc5da4cea8062..7c8e130ba702a8f2b660725143a08d27d938e236 100644 (file)
@@ -81,7 +81,7 @@ static int tcl_new_connection(struct connection *connection)
 
 static int tcl_input(struct connection *connection)
 {
-       Jim_Interp *interp = (Jim_Interp *)connection->priv;
+       Jim_Interp *interp = (Jim_Interp *)connection->cmd_ctx->interp;
        int retval;
        int i;
        ssize_t rlen;
@@ -157,7 +157,7 @@ static int tcl_closed(struct connection *connection)
        return ERROR_OK;
 }
 
-int tcl_init(struct command_context *cmd_ctx)
+int tcl_init(void)
 {
        int retval;
 
@@ -169,7 +169,7 @@ int tcl_init(struct command_context *cmd_ctx)
 
        retval = add_service("tcl", CONNECTION_TCP, tcl_port, 1,
                        &tcl_new_connection, &tcl_input,
-                       &tcl_closed, cmd_ctx->interp);
+                       &tcl_closed, NULL);
        return retval;
 }
 
index 68ad821280868e6ac744a308499adae8fb009cae..8035a045929e2c0645f7f77ad4cdc56a43f2a742 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <server/server.h>
 
-int tcl_init(struct command_context *cmd_ctx);
+int tcl_init(void);
 int tcl_register_commands(struct command_context *cmd_ctx);
 
 #endif /* _TCL_SERVER_H_ */

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)