[vlc-commits] ftp: fix cast ugliness
Thomas Guillem
git at videolan.org
Tue Feb 6 19:31:42 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 6 18:58:58 2018 +0100| [9bb080af577864f7f8dbaa12fa68041999a721ad] | committer: Thomas Guillem
ftp: fix cast ugliness
Fixes #19616
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9bb080af577864f7f8dbaa12fa68041999a721ad
---
modules/access/ftp.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 2839a45d22..5e7b15fb12 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -356,7 +356,7 @@ static void clearCmd( access_sys_t *p_sys )
}
}
-static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
+static int Login( vlc_object_t *p_access, access_sys_t *p_sys, const char *path )
{
int i_answer;
@@ -443,7 +443,7 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
vlc_url_t url;
vlc_credential credential;
- if( vlc_UrlParseFixup( &url, ((stream_t *)p_access)->psz_url ) != 0 )
+ if( vlc_UrlParseFixup( &url, path ) != 0 )
{
vlc_UrlClean( &url );
goto error;
@@ -585,9 +585,9 @@ static const char *IsASCII( const char *str )
return str;
}
-static int Connect( vlc_object_t *p_access, access_sys_t *p_sys )
+static int Connect( vlc_object_t *p_access, access_sys_t *p_sys, const char *path )
{
- if( Login( p_access, p_sys ) < 0 )
+ if( Login( p_access, p_sys, path ) < 0 )
return -1;
/* Extended passive mode */
@@ -613,7 +613,7 @@ static int Connect( vlc_object_t *p_access, access_sys_t *p_sys )
msg_Info( p_access, "FTP Extended passive mode disabled" );
clearCmd( p_sys );
- if( Login( p_access, p_sys ) )
+ if( Login( p_access, p_sys, path ) )
goto error;
}
@@ -710,7 +710,7 @@ static int InOpen( vlc_object_t *p_this )
if( parseURL( &p_sys->url, p_access->psz_url, p_sys->tlsmode ) )
goto exit_error;
- if( Connect( p_this, p_sys ) )
+ if( Connect( p_this, p_sys, p_access->psz_url ) )
goto exit_error;
do {
@@ -801,7 +801,7 @@ static int OutOpen( vlc_object_t *p_this )
goto exit_error;
}
- if( Connect( p_this, p_sys ) )
+ if( Connect( p_this, p_sys, p_access->psz_path ) )
goto exit_error;
/* Start the 'stream' */
More information about the vlc-commits
mailing list