Index: access/ftp.c
===================================================================
--- access/ftp.c	(revision 15839)
+++ access/ftp.c	(working copy)
@@ -124,6 +124,10 @@
     msg_Dbg( p_access, "connection accepted (%d)", i_answer );
 
     psz = var_CreateGetString( p_access, "ftp-user" );
+    if( p_sys->url.psz_username ) 
+    {
+	strcpy( psz, p_sys->url.psz_username );
+    }
     if( ftp_SendCommand( p_access, "USER %s", psz ) < 0 ||
         ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
     {
@@ -140,6 +144,10 @@
         case 3:
             msg_Dbg( p_access, "password needed" );
             psz = var_CreateGetString( p_access, "ftp-pwd" );
+	    if( p_sys->url.psz_password ) 
+	    {
+		strcpy( psz, p_sys->url.psz_password );
+	    }
             if( ftp_SendCommand( p_access, "PASS %s", psz ) < 0 ||
                 ftp_ReadCommand( p_access, &i_answer, NULL ) < 0 )
             {
