Commit 9bb080af authored by Thomas Guillem's avatar Thomas Guillem

ftp: fix cast ugliness

Fixes #19616
parent 82f4830b
......@@ -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' */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment