Hi,

I wrote an application that uploads a data stream to an ftp server. This 
is working so far exept that I'm unable to properly finish the FTP 
connection after the upload is done.

In a simple test where I'm sending a stream with 6 bytes my read callback 
function is called 2 times by curl. First time i send a short string with 
6 bytes length (where 6 is also my return value). Second (and last) time 
curl calls the function I return a 0 to signal end of transmission. I 
expected curl would quit ftp connection but instead FTP server is left 
open. If I instead return CURL_READFUNC_ABORT after upload of data the ftp 
server will be disconnected as expected. But this might be not the default 
way for an successful upload. :-)

I also set CURLOPT_INFILESIZE_LARGE to (curl_off_t) 6. No difference in 
behavior and problem is the same.

I've read all notes on curlopt_readfunction. From my point of view I do 
not a "pre-matured" returning of 0 value.

What I'm doing wrong? 

Thanks and cheers


Thomas

_____________________________________________________________________________________
Bitte überlegen Sie, ob Sie diese Nachricht wirklich ausdrucken müssen/ before 
printing, think about environmental responsibility.

Hydrometer GmbH, Industriestraße 13, 91522 Ansbach,
Telefon + 49 981 1806 0, Telefax +49 981 1806 615
Sitz der Gesellschaft: Ansbach, Registriergericht: Ansbach HRB 69
Geschäftsführer: Johannes Sappa (Sprecher), Dr.-Ing. Robert Westphal

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthält vertrauliche und/oder rechtlich geschützte Informationen. Informieren 
Sie    uns bitte, wenn Sie diese E-Mail fälschlicherweise erhalten haben. Bitte 
löschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der 
Reproduktion, Bekanntgabe, Änderung, Verteilung und/oder Publikation dieser 
E-Mail ist strengstens untersagt.

The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by mistake and delete it in such a case. Each 
unauthorized reproduction, disclosure, alteration, distribution and/or 
publication of this e-mail is strictly prohibited.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to