cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLOPT_WRITEFUNCTION - cannot make it working...

From: Paolo Piacentini <paolopiace_at_hotmail.com>
Date: Sun, 5 Jun 2011 09:58:34 -0700

BS>> curl_easy_setopt(sessionA, CURLOPT_WRITEDATA, NULLFILE);
BS>> curl_easy_setopt(sessionA, CURLOPT_WRITEHEADER, HeaderFile);
BS>> I had better luck without this stuff. Perhaps you don't want to do CURLOPT_WRITEDATA twice.
 
Brad... Your hint was precious. I checked, tested an retested:
 
It's the CURLOPT_WRITEHEADER that corrupts the initialization of the user data_struct. If I comment that line, the getinmemory.c works just fine. NO segmentation fault!
 
The first CURLOPT_WRITEDATA to /dev/null does not make any trouble. And I need it.
 
As second thought, I may not need to store the header and just remove that line.
 
I want to thank all of you guys.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-06-05