From 31b050108a1cd740b326dddfa7a2f1322ee8c186 Mon Sep 17 00:00:00 2001 From: Matthias Bode Date: Mon, 3 May 2010 22:35:38 +0200 Subject: Fixed bug in tcl-server 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/tcl_server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/tcl_server.c') diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index a88c4365..7c8e130b 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -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; } -- cgit v1.2.3