cURL / Mailing Lists / curl-library / Single Mail


Re: Really weird problem with CURLOPT_WRITEFUNCTION

From: Kamil Dudka <>
Date: Wed, 23 Dec 2009 20:18:02 +0100

On Wednesday 23 of December 2009 06:52:50 Joshua McCracken wrote:
> int get_url_data(void *buff, size_t size, size_t bytes, void *userp)
> {
> size_t actual_size = size * bytes;
> struct writestruct *memory = (struct writestruct *)userp;

You want to stop debugger at this point ^^^. Check if the 'memory' pointer
points to a valid object. The object is managed by you, not by libcurl.

Where do you allocate and initialize the object you are working with
actually? I suspect the pointer is no longer valid in time the callback
is being executed...

List admin:
Received on 2009-12-23