[FFmpeg-cvslog] ftp: add invalid code for RETR operation

Lukasz Marek git at videolan.org
Sat Jun 8 16:05:30 CEST 2013


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Sat Jun  8 03:34:56 2013 +0200| [ff35c7cdfac3a4affa9e98a806281da99f66787f] | committer: Lukasz Marek

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 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff35c7cdfac3a4affa9e98a806281da99f66787f
---

 libavformat/ftp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 5b1c425..a256a25 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -378,7 +378,7 @@ static int ftp_file_size(FTPContext *s)
 static int ftp_retrieve(FTPContext *s)
 {
     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);
     if (ftp_send_command(s, command, retr_codes, NULL) != 150)



More information about the ffmpeg-cvslog mailing list