cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: i receive the http server response messages, but my program coredump in data->set.fwrite

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 23 Sep 2004 14:39:28 +0200 (CEST)

On Thu, 23 Sep 2004, [utf-8] ??? wrote:

> I send a get method to http server and use the below callback func to store
> the response message
>
> int cry::callback_receiveFromHTTPServer(void *LOC_H_ptr, size_t LOC_H_size,
> size_t LOC_H_nmemb, void * LOC_H_data)

This must be a static function. It won't get a 'this' passed in.

> after execute the curl_easy_perform, my program coredump at the place:
> wrote = data->set.fwrite(ptr, 1, len, data->set.out);

That 'set.fwrite' is a function pointer that points to your function, if you
used CURLOPT_WRITEFUNCTION.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-09-23