cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: GET reply problem

From: Pedro Neves <pneves_at_av.it.pt>
Date: Thu, 16 Jun 2005 04:01:33 +0100

Dan Fandrich wrote:

>On Wed, Jun 15, 2005 at 03:28:27PM +0100, Pedro Neves wrote:
>
>
>>I am not sure, but probably not. I should call the fclose(), rigth?
>>Anyway, I send you the functions that I am calling:
>>
>>
>
>Right, if you're doing an fopen (which you are). You'll probably want to
>call it after curl_easy_perform().
>
>
I did not understood. I should call fclose() after curl_easy_perform()?
I thought I should call fclose() in the callback function that I have
created to open the file.

I think that my problem with libcurl can also be related with the fact
that I am using _only one_ handle for all my program. I create the
handle in the beginning of the main function and I use it until the end.
Is this ok? Or should I use one handle for each GET operation that I
perform?

>
>
>>>And are you writing every data block to the file from your
>>>write callback function, regardless of the site of the data block?
>>>
>>>
>>>
>>>
>>Sorry, but I didnt understood the question. Are you asking me if I am
>>writing to file everytime I call the URL?
>>
>>
>
>This assumed that you might be doing doing something fishy in your write
>callback, but you're not. It sure sounds like it's a missing close in your
>case.
>
>N.B. Future questions of this sort are better asked in the curl-library list
>instead of this one.
>
>
Thanks for the sugestion. I will follow it in the next email.

Thanks for your help and attention.

Pedro

>
>
>>>>Dan
>>>>
>>>>
Received on 2005-06-16