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;