#define CACHING_TEXT N_("Caching value in ms")
#define CACHING_LONGTEXT N_( \
- "Allows you to modify the default caching value for FTP streams. This " \
- "value should be set in millisecond units." )
+ "Caching value for FTP streams. This " \
+ "value should be set in milliseconds." )
#define USER_TEXT N_("FTP user name")
-#define USER_LONGTEXT N_("Allows you to modify the user name that will " \
+#define USER_LONGTEXT N_("User name that will " \
"be used for the connection.")
#define PASS_TEXT N_("FTP password")
-#define PASS_LONGTEXT N_("Allows you to modify the password that will be " \
+#define PASS_LONGTEXT N_("Password that will be " \
"used for the connection.")
#define ACCOUNT_TEXT N_("FTP account")
-#define ACCOUNT_LONGTEXT N_("Allows you to modify the account that will be " \
+#define ACCOUNT_LONGTEXT N_("Account that will be " \
"used for the connection.")
vlc_module_begin();
}
msg_Dbg( p_access, "connection accepted (%d)", i_answer );
+
+ if( p_sys->url.psz_username && *p_sys->url.psz_username )
+ psz = strdup( p_sys->url.psz_username );
+ else
+ psz = var_CreateGetString( p_access, "ftp-user" );
- psz = var_CreateGetString( p_access, "ftp-user" );
if( ftp_SendCommand( p_access, "USER %s", psz ) < 0 ||
ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
{
break;
case 3:
msg_Dbg( p_access, "password needed" );
- psz = var_CreateGetString( p_access, "ftp-pwd" );
+ if( p_sys->url.psz_password && *p_sys->url.psz_password )
+ psz = strdup( p_sys->url.psz_password );
+ else
+ psz = var_CreateGetString( p_access, "ftp-pwd" );
+
if( ftp_SendCommand( p_access, "PASS %s", psz ) < 0 ||
ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
{
char *psz_arg;
/* Init p_access */
- p_access->pf_read = Read;
- p_access->pf_block = NULL;
- p_access->pf_seek = Seek;
- p_access->pf_control = Control;
- p_access->info.i_update = 0;
- p_access->info.i_size = 0;
- p_access->info.i_pos = 0;
- p_access->info.b_eof = VLC_FALSE;
- p_access->info.i_title = 0;
- p_access->info.i_seekpoint = 0;
- p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
- memset( p_sys, 0, sizeof( access_sys_t ) );
+ STANDARD_READ_ACCESS_INIT
p_sys->fd_cmd = -1;
p_sys->fd_data = -1;