static int ftp_retrieve(FTPContext *s)
{
char command[CONTROL_BUFFER_SIZE];
- static const int retr_codes[] = {150, 0};
+ static const int retr_codes[] = {150, 125, 0};
+ int resp_code;
snprintf(command, sizeof(command), "RETR %s\r\n", s->path);
- if (ftp_send_command(s, command, retr_codes, NULL) != 150)
+ resp_code = ftp_send_command(s, command, retr_codes, NULL);
+ if (resp_code != 125 && resp_code != 150)
return AVERROR(EIO);
s->state = DOWNLOADING;
static int ftp_store(FTPContext *s)
{
char command[CONTROL_BUFFER_SIZE];
- static const int stor_codes[] = {150, 0};
+ static const int stor_codes[] = {150, 125, 0};
+ int resp_code;
snprintf(command, sizeof(command), "STOR %s\r\n", s->path);
- if (ftp_send_command(s, command, stor_codes, NULL) != 150)
+ resp_code = ftp_send_command(s, command, stor_codes, NULL);
+ if (resp_code != 125 && resp_code != 150)
return AVERROR(EIO);
s->state = UPLOADING;
} /* if option is not given, don't pass it and let tcp use its own default */
err = ffurl_open_whitelist(&s->conn_control, buf, AVIO_FLAG_READ_WRITE,
&h->interrupt_callback, &opts,
- h->protocol_whitelist);
+ h->protocol_whitelist, h->protocol_blacklist);
av_dict_free(&opts);
if (err < 0) {
av_log(h, AV_LOG_ERROR, "Cannot open control connection\n");
} /* if option is not given, don't pass it and let tcp use its own default */
err = ffurl_open_whitelist(&s->conn_data, buf, h->flags,
&h->interrupt_callback, &opts,
- h->protocol_whitelist);
+ h->protocol_whitelist, h->protocol_blacklist);
av_dict_free(&opts);
if (err < 0)
return err;