curl-library
Re: error 425
Date: Mon, 07 Jan 2008 13:54:56 +0100
Daniel Stenberg wrote:
> On Mon, 7 Jan 2008, tristan wrote:
>
>>> EPRT |1|0.0.0.21|40101|
>
> What address did you give to libcurl to connect to? 0.0.0.21 is very
> unlikely to be a valid IP address..
>
>>> RETR gestion.txt
>> < 425 Unable to build data connection: Invalid argument
>
> ... no surprise really, since it fails to connect to 0.0.0.21...
>
the code I use is :
curl_easy_setopt(m_hOpen, CURLOPT_VERBOSE, 1);
ret = curl_easy_setopt(hFtpGetSession, CURLOPT_URL,
"ftp.blunderer.org/gestion.txt");
ret = curl_easy_setopt(hFtpGetSession, CURLOPT_USERPWD,
"ittem.blunderer.org:ittem");
ret = curl_easy_setopt(hFtpGetSession, CURLOPT_FTPPORT, "21");
ret = curl_easy_setopt(hFtpGetSession, CURLOPT_WRITEFUNCTION, ftp_fwrite);
ret = curl_easy_setopt(hFtpGetSession, CURLOPT_WRITEDATA, (void*)&myFile);
Test = (curl_easy_perform(hFtpGetSession) == CURLE_OK);
Received on 2008-01-07