target_register_event_callback(telnet_target_callback_event_handler, connection->cmd_ctx);
+ log_add_callback(telnet_log_callback, connection);
+
+
+
return ERROR_OK;
}
continue;
}
- log_add_callback(telnet_log_callback, connection);
-
retval = command_run_line(command_context, t_con->line);
- log_remove_callback(telnet_log_callback, connection);
-
if (retval == ERROR_COMMAND_CLOSE_CONNECTION)
{
return ERROR_SERVER_REMOTE_CLOSED;
telnet_connection_t *t_con = connection->priv;
int i;
+ log_remove_callback(telnet_log_callback, connection);
+
if (t_con->prompt)
{
free(t_con->prompt);