This is an automated email from Gerrit. Austin Morton ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/2759
-- gerrit commit 22e658a38b64245f5a2b8a5c15de8cb1fce386f5 Author: Austin Morton <[email protected]> Date: Sat May 2 18:00:37 2015 -0400 server: fix bug with tcl_server and no current target introduced by #2336 Change-Id: I36e2a7482f7db3a30ff7e9f969c3b6cda9599382 Signed-off-by: Austin Morton <[email protected]> diff --git a/src/server/tcl_server.c b/src/server/tcl_server.c index d6828f1..65f71cc 100644 --- a/src/server/tcl_server.c +++ b/src/server/tcl_server.c @@ -123,7 +123,7 @@ static int tcl_new_connection(struct connection *connection) memset(tclc, 0, sizeof(struct tcl_connection)); connection->priv = tclc; - struct target *target = get_current_target(connection->cmd_ctx); + struct target *target = get_target_by_num(connection->cmd_ctx->current_target); if (target != NULL) tclc->tc_laststate = target->state; diff --git a/src/target/target.c b/src/target/target.c index 27f8839..4ea445f 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -486,7 +486,7 @@ struct target *get_target(const char *id) } /* returns a pointer to the n-th configured target */ -static struct target *get_target_by_num(int num) +struct target *get_target_by_num(int num) { struct target *target = all_targets; diff --git a/src/target/target.h b/src/target/target.h index 9382720..7471c1b 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -356,6 +356,7 @@ int target_call_timer_callbacks(void); */ int target_call_timer_callbacks_now(void); +struct target *get_target_by_num(int num); struct target *get_current_target(struct command_context *cmd_ctx); struct target *get_target(const char *id); -- ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
