[vlc-devel] [PATCH iv2] ftp: fix handling of NLST response

Ilya Yanok ilya.yanok at gmail.com
Wed Dec 2 22:42:27 CET 2020


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.
---
 Fixed typo in the desciption and hopefully this time it will be
 applicable (copy/pasting the patch to GMail web-interface was a bad idea)

 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 553e5b5ddb..d1de89ac13 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -1146,7 +1146,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;
-- 
2.29.2



More information about the vlc-devel mailing list