static int ftp_abort(URLContext *h)

{

    static const char *command = "ABOR\r\n";

    int err;

    static const int abor_codes[] = {225, 226, 0};

    FTPContext *s = h->priv_data;



    /* According to RCF 959:

       "ABOR command tells the server to abort the previous FTP

       service command and any associated transfer of data."



       There are FTP server implementations that don't response

       to any commands during data transfer in passive mode (including ABOR).



       This implementation closes data connection by force.

    */



    if (ftp_send_command(s, command, NULL, NULL) < 0) {

        ftp_close_both_connections(s);

        if ((err = ftp_connect_control_connection(h)) < 0) {

            av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");

            return err;

        }

    } else {

        ftp_close_data_connection(s);

    }



    if (ftp_status(s, NULL, abor_codes) < 225) {

        /* wu-ftpd also closes control connection after data connection closing */

        ffurl_closep(&s->conn_control);

        if ((err = ftp_connect_control_connection(h)) < 0) {

            av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");

            return err;

        }

    }



    return 0;

}

static int ftp_abort(URLContext *h)

{

    static const char *command = "ABOR\r\n";

    int err;

    static const int abor_codes[] = {225, 226, 0};

    FTPContext *s = h->priv_data;



    



















    if (ftp_send_command(s, command, NULL, NULL) < 0) {

        ftp_close_both_connections(s);

        if ((err = ftp_connect_control_connection(h)) < 0) {

            av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");

            return err;

        }

    } else {

        ftp_close_data_connection(s);

    }



    if (ftp_status(s, NULL, abor_codes) < 225) {

        

        ffurl_closep(&s->conn_control);

        if ((err = ftp_connect_control_connection(h)) < 0) {

            av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");

            return err;

        }

    }



    return 0;

}

    if (ftp_status(s, NULL, abor_codes) < 225) {         ffurl_closep(&s->conn_control);         if ((err = ftp_connect_control_connection(h)) < 0) {             av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");             return err;
static int FUNC_0(URLContext *VAR_0)

{

    static const char *VAR_1 = "ABOR\r\n";

    int VAR_2;

    static const int VAR_3[] = {225, 226, 0};

    FTPContext *s = VAR_0->priv_data;



    



















    if (ftp_send_command(s, VAR_1, NULL, NULL) < 0) {

        ftp_close_both_connections(s);

        if ((VAR_2 = ftp_connect_control_connection(VAR_0)) < 0) {

            av_log(VAR_0, AV_LOG_ERROR, "Reconnect failed.\n");

            return VAR_2;

        }

    } else {

        ftp_close_data_connection(s);

    }



    if (ftp_status(s, NULL, VAR_3) < 225) {

        

        ffurl_closep(&s->conn_control);

        if ((VAR_2 = ftp_connect_control_connection(VAR_0)) < 0) {

            av_log(VAR_0, AV_LOG_ERROR, "Reconnect failed.\n");

            return VAR_2;

        }

    }



    return 0;

}

static int FUNC_0(URLContext *VAR_0)
{ static const char *VAR_1 = "ABOR\r\n"; int VAR_2; static const int VAR_3[] = {225, 226, 0}; FTPContext *s = VAR_0->priv_data; if (ftp_send_command(s, VAR_1, NULL, NULL) < 0) { ftp_close_both_connections(s); if ((VAR_2 = ftp_connect_control_connection(VAR_0)) < 0) { av_log(VAR_0, AV_LOG_ERROR, "Reconnect failed.\n"); return VAR_2; } } else { ftp_close_data_connection(s); } if (ftp_status(s, NULL, VAR_3) < 225) { ffurl_closep(&s->conn_control); if ((VAR_2 = ftp_connect_control_connection(VAR_0)) < 0) { av_log(VAR_0, AV_LOG_ERROR, "Reconnect failed.\n"); return VAR_2; } } return 0; }