summaryrefslogtreecommitdiff
path: root/libavformat/ftp.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2013-06-03 01:39:01 +0200
committerLukasz Marek <lukasz.m.luki@gmail.com>2013-06-08 03:54:55 +0200
commitbc29acdc76fdbf70700cdc2f85fc2afb46e19e47 (patch)
tree07807544a084a9545a12de29a7842bdb1650de12 /libavformat/ftp.c
parent43eda88200a7a60cba8948feb516f0785c193806 (diff)
downloadffmpeg-bc29acdc76fdbf70700cdc2f85fc2afb46e19e47.tar.gz
ftp: explicit return code checks
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Diffstat (limited to 'libavformat/ftp.c')
-rw-r--r--libavformat/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index f730c6d00c..b2e842f265 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -386,7 +386,7 @@ static int ftp_store(FTPContext *s)
const int stor_codes[] = {150, 0};
snprintf(command, sizeof(command), "STOR %s\r\n", s->path);
- if (!ftp_send_command(s, command, stor_codes, NULL))
+ if (ftp_send_command(s, command, stor_codes, NULL) != 150)
return AVERROR(EIO);
s->state = UPLOADING;
@@ -443,7 +443,7 @@ static int ftp_connect_control_connection(URLContext *h)
}
/* consume all messages from server */
- if (!ftp_status(s, NULL, connect_codes)) {
+ if (ftp_status(s, NULL, connect_codes) != 220) {
av_log(h, AV_LOG_ERROR, "FTP server not ready for new users\n");
err = AVERROR(EACCES);
return err;