[FFmpeg-cvslog] ftp: rename function name

Lukasz Marek git at videolan.org
Fri May 31 19:28:16 CEST 2013


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Thu May 30 03:54:28 2013 +0200| [80cce899f62cfb8040b4a020911773fe07627fcd] | committer: Lukasz Marek

ftp: rename function name

ftp_send_command was used only once.

This commit makes this function specific, not generic

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

 libavformat/ftp.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index f550c14..3b69bc1 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -376,14 +376,14 @@ static int ftp_store(FTPContext *s)
     return 0;
 }
 
-static int ftp_send_command(FTPContext *s, const char* command)
+static int ftp_type(FTPContext *s)
 {
     int err;
+    const char *command = "TYPE I\r\n";
 
     if ((err = ffurl_write(s->conn_control, command, strlen(command))) < 0)
         return err;
-    ftp_status(s, &err, NULL, NULL, NULL, -1);
-    if (err != 2)
+    if (ftp_status(s, NULL, NULL, NULL, NULL, 200) != 200)
         return AVERROR(EIO);
 
     return 0;
@@ -459,7 +459,7 @@ static int ftp_open(URLContext *h, const char *url, int flags)
         if ((err = ftp_auth(s, auth)) < 0)
             goto fail;
 
-        if ((err = ftp_send_command(s, "TYPE I\r\n")) < 0)
+        if ((err = ftp_type(s)) < 0)
             goto fail;
 
         if ((err = ftp_current_dir(s)) < 0)



More information about the ffmpeg-cvslog mailing list