[vlc-commits] ftp: fix handling of NLST response

Ilya Yanok git at videolan.org
Thu Dec 3 09:37:46 UTC 2020


vlc/vlc-3.0 | branch: master | Ilya Yanok <ilya.yanok at gmail.com> | Wed Dec  2 22:42:27 2020 +0100| [28bfc8c49581456c8e3ca4410691d6230cdc554d] | committer: Thomas Guillem

ftp: fix handling of NLST response

Commit e1508444 broke the NLST response handling: getting
1xx response is what we actually expect, not a reason to fail.

This was reported as Android-specific bug:
https://code.videolan.org/videolan/vlc-android/-/issues/644
two years ago and is still not fixed.

This is invisible if FTP server supports MSLT feature.

(cherry picked from commit bd1ded483a180ca093a003c080b75d2fa72131aa)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=28bfc8c49581456c8e3ca4410691d6230cdc554d
---

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

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index cda4d67014..0aea13ac95 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -1154,7 +1154,7 @@ static int ftp_StartStream( vlc_object_t *p_access, access_sys_t *p_sys,
         }
         else
         if( ftp_SendCommand( p_access, p_sys, "NLST" ) < 0 ||
-            ftp_RecvCommandInit( p_access, p_sys ) == 1 )
+            ftp_RecvCommandInit( p_access, p_sys ) != 1 )
         {
             msg_Err( p_access, "cannot list directory contents" );
             return VLC_EGENERIC;



More information about the vlc-commits mailing list