cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl crash - curl_easy_perform() ???

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 21 Jun 2005 23:54:35 +0200 (CEST)

On Tue, 21 Jun 2005, Pedro Neves wrote:

> I am using libcurl to perform GET operations to an equipment. When I
> perform the GET operations, sometimes the libcurl is blocked and my
> program stops.

The subject says crash, this says "stops".

When you say "stops", you mean it returns before it is complete? If so, what
does curl_easy_perform() return?

Please remind me, what libcurl version on what OS is this?

> Everytime I want to perform a GET operation, I am opening the file file to
> write, and after the reception of the reply message I am closing the file
> and performing an fflush().

closing implies flusing, no need to make that too.

And you get only the partial file? How much is missing? Does it always miss
the same amount? Does it always miss a part?

> However, I still have the problem. I copy in this email a small part of the
> code (sorry for this) for someone to give me a hand:

> curl_easy_perform(handle);

Checking return code is vital.

> curl_easy_perform(handle);

And again.

> This is a small part of the program. Maybe I am doing something wrong in the
> curl_easy_perform() function.

Perhaps, but this little snippet doesn't tell.

If you _really_ want us to help, you should make an effort to write a small
stand-alone source code example that makes your problem appear when operating
on a public URL. It would enable us to debug and trace everything easily in
our ends.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-06-21