[vlc-devel] commit: More fixes ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Jun 1 10:41:23 CEST 2008


vlc | branch: 0.8.6-bugfix | Rémi Denis-Courmont <rem at videolan.org> | Sat Sep  9 10:24:52 2006 +0000| [d98ebefd3f64a92d3bab39c6b1b8970759c7facd]

More fixes

(cherry picked from commit 020a810e8d5ebd18f38017834025e764d5618fa6)

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

 modules/access/ftp.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index f16b7d8..10e2770 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -497,7 +497,6 @@ static int ftp_ReadCommand( access_t *p_access,
     int          i_answer;
 
     psz_line = net_Gets( p_access, p_sys->fd_cmd, NULL );
-    msg_Dbg( p_access, "answer=%s", psz_line );
     if( psz_line == NULL || strlen( psz_line ) < 3 )
     {
         msg_Err( p_access, "cannot get answer" );
@@ -506,6 +505,7 @@ static int ftp_ReadCommand( access_t *p_access,
         if( ppsz_answer ) *ppsz_answer  = NULL;
         return -1;
     }
+    msg_Dbg( p_access, "answer=%s", psz_line );
 
     if( psz_line[3] == '-' )    /* Multiple response */
     {
@@ -570,7 +570,7 @@ static int ftp_StartStream( access_t *p_access, off_t i_start )
         return VLC_EGENERIC;
     }
 
-    if( psz_ip != NULL )
+    if( *psz_ip )
     {
         char psz_fmt[7] = "(|||%u";
         psz_fmt[1] = psz_fmt[2] = psz_fmt[3] = psz_parser[1];
@@ -584,7 +584,7 @@ static int ftp_StartStream( access_t *p_access, off_t i_start )
     }
     else
     {
-        unsigned  a1, a2, a3, a4, p1, p2;
+        unsigned a1, a2, a3, a4, p1, p2;
 
         if( ( sscanf( psz_parser, "(%u,%u,%u,%u,%u,%u", &a1, &a2, &a3, &a4,
                       &p1, &p2 ) < 6 ) || ( a1 > 255 ) || ( a2 > 255 )
@@ -637,6 +637,12 @@ static int ftp_StartStream( access_t *p_access, off_t i_start )
         msg_Err( p_access, "cannot retreive file" );
         return VLC_EGENERIC;
     }
+
+    if( p_access->i_object_type == VLC_OBJECT_ACCESS )
+        net_StopSend( p_sys->fd_data );
+    else
+        net_StopRecv( p_sys->fd_data );
+
     return VLC_SUCCESS;
 }
 




More information about the vlc-devel mailing list