[vlc-devel] how to retrieve and store file via ftp
PyPe
pype at gameflux.com
Sun Nov 14 15:18:41 CET 2004
Hello,
I'd like to implement the possibility to connect to a ftp site and retrieve
a file (currently the default.vlt file for skins2 theme upate).
I used the FTP functions to connect and send commands to the ftp server,
but it always get stuck at the
answer=150 Data connection accepted from MYIP:PORT ; transfer starting for
default.vlt (228660 bytes).
I am using the :
if( ftp_StartStream( p_access, 0 ) < 0 )
{
msg_Dbg( p_access, "cannot retrieve file" );
if( p_sys->fd_cmd > 0 )
{
net_Close( p_sys->fd_cmd );
}
free(p_sys);
}
and in startstream this :
if( ftp_SendCommand( p_access, "RETR %s", p_sys->url.psz_path ) < 0 ||
ftp_ReadCommand( p_access, &i_answer, NULL ) > 2 )
{
msg_Err( p_access, "cannot retreive file" );
return VLC_EGENERIC;
}
return VLC_SUCCESS;
It's the same as in the ftp access module, all seems to work fine, but the
file is not transfered ..
I'm not very good at c/c++ programming, and if someone can help me to solve
this problem, i would appreciate .
I can post the entire file (500 lines long) if you want to correct me . its
purpose is to popup a message window with "update" button, and onvalid it
goes fetch the updated default.vlt on the ftp server.
thanks for your answers.
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list