Any libcurl expert who might knows something about it?
I notice this because I cannot turn libcurl VERBOSE off:
curl_easy_setopt(curl, CURLOPT_VERBOSE, 0L);
When I trace thru the call into libcurl, I found that 0L (long) is converted into a non-zero number, causing the VERBOSE to be always on. I haven’t tried but I am pretty sure any long param will not be passed correctly.
data->set.verbose = (0 != va_arg(param, long))?TRUE:FALSE;
where
#define va_arg _crt_va_arg
#define _crt_va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) )
But I am not sure what these are doing.
Why it this occuring and how to fix it?
I am using Visual Studio 2010 C++ with libcurl 7.27.0
va_arg()is using pointer arithmetic to extract the 0L from yourva_list param. You can read more on theva_listtype here or here. It is not converting your 0L to a non-zero number.Try calling curl_easy_setopt() before opening your connection. The documentation states that your verbose setting is “set once to go for many independent connections” (urldata.h ln 1537).
If you still don’t believe it’s working, you can cast your CURL* into a SessionHandle* and inspect it in the debugger, eg:
You’ll find the definition of SessionHandle in urldata.h.