curl-library
Re: cURL bug -- Segmentation Fault when timeout is 1 second
Date: Wed, 4 Feb 2009 16:32:58 +0100
In my C-Adaption I replaced the "string buffer" with a "char* buffer" and
rewrote the writer-function. Also there, the bug appears. And: I copied the
code from the offical size, so it cannot be my fault. So, is there a bug in
my code?
--------------------------------------------------
From: "Gisle Vanem" <gvanem_at_broadpark.no>
Sent: Wednesday, February 04, 2009 7:08 AM
To: "libcurl development" <curl-library_at_cool.haxx.se>
Subject: Re: cURL bug -- Segmentation Fault when timeout is 1 second
>> ... * snip *
>>>
>>> string buffer; curl_easy_setopt(curl, CURLOPT_WRITEDATA,
>>> &buffer);
>> .... * snip *
>>>
>>> http_call(); sleep(2);
>>
>
> Daniel Marschall <info_at_daniel-marschall.de> wrote:
>
>> No, I cannot see what could be wrong there. I call the URL and wait 2
>> seconds.
>
> At first look it seemed you were using a variable on stack in a
> global scope (while sleep() is running). But as Daniel saids, you cannot
> pass a 'std::string' to CURLOPT_WRITEDATA.
>
> --gv
>
Received on 2009-02-04