mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-25 00:32:31 +00:00
ftp: add invalid code for RETR operation
554 is possible invalid code: - Restart not valid - Command terminated due to server shutdown in progress - etc... Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
This commit is contained in:
parent
89b4800eef
commit
ff35c7cdfa
@ -378,7 +378,7 @@ static int ftp_file_size(FTPContext *s)
|
|||||||
static int ftp_retrieve(FTPContext *s)
|
static int ftp_retrieve(FTPContext *s)
|
||||||
{
|
{
|
||||||
char command[CONTROL_BUFFER_SIZE];
|
char command[CONTROL_BUFFER_SIZE];
|
||||||
const int retr_codes[] = {150, 550, 0}; /* 550 is incorrect code */
|
const int retr_codes[] = {150, 550, 554, 0}; /* 550, 554 are incorrect codes */
|
||||||
|
|
||||||
snprintf(command, sizeof(command), "RETR %s\r\n", s->path);
|
snprintf(command, sizeof(command), "RETR %s\r\n", s->path);
|
||||||
if (ftp_send_command(s, command, retr_codes, NULL) != 150)
|
if (ftp_send_command(s, command, retr_codes, NULL) != 150)
|
||||||
|
Loading…
Reference in New Issue
Block a user