[vlc-devel] commit: Don't hang VLC on ABOR in FTP access (closes #2027) ( Marian Durkovic )

git version control git at videolan.org
Fri Sep 12 13:04:26 CEST 2008


vlc | branch: 0.9-bugfix | Marian Durkovic <md at bts.sk> | Fri Sep 12 13:05:32 2008 +0200| [73ec9d3b43208e179d4088b2d3d56f3f3a7f9a0a] | committer: Derk-Jan Hartman 

Don't hang VLC on ABOR in FTP access (closes #2027)

Signed-off-by: Derk-Jan Hartman <hartman at videolan.org>
(cherry picked from commit 5a16baa241c5e7f3104530102813260fa469d107)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73ec9d3b43208e179d4088b2d3d56f3f3a7f9a0a
---

 modules/access/ftp.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 75878f4..79cf667 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -791,16 +791,13 @@ static int ftp_StopStream ( vlc_object_t *p_access, access_sys_t *p_sys )
 
     if( p_sys->fd_data != -1 )
     {
-        int i_answer;
-        ftp_ReadCommand( p_access, p_sys, &i_answer, NULL );
-        if ( i_answer != 227 )
-            /* If answer is from the previous command,
-             * rathen that succesful ABOR - read next command */
-            ftp_ReadCommand( p_access, p_sys, NULL, NULL );
-
         net_Close( p_sys->fd_data );
         p_sys->fd_data = -1;
+        /* Read the final response from RETR/STOR, i.e. 426 or 226 */
+        ftp_ReadCommand( p_access, p_sys, NULL, NULL );
     }
+    /* Read the response from ABOR, i.e. 226 or 225 */
+    ftp_ReadCommand( p_access, p_sys, NULL, NULL );
 
     return VLC_SUCCESS;
 }




More information about the vlc-devel mailing list