cURL / Mailing Lists / curl-library / Single Mail

curl-library

Getting Assertion When using curl_easy_setopt with CURLOPT_DEBUGFUNCTION

From: Meir Yanovich <meiry242_at_gmail.com>
Date: Tue, 20 May 2008 09:37:38 +0300

Hello all
im using curl_easy_setopt with CURLOPT_DEBUGFUNCTION to print traces i
toke this code from the examples that comes with curl
i have endless loop that invoke this procedure every 5 secounds .
the code :
/* get verbose debug output please */

curl_easy_setopt(curl_handle, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1);
.....
....
static int my_trace(CURL *handle, curl_infotype type,
char *data, size_t size,void *userp)
{
char *text = "";
(void)handle; /* prevent compiler warning */

switch (type) {
case CURLINFO_TEXT:

text = data;
break;
case CURLINFO_HEADER_OUT:
text = "=> Send header";
break;
case CURLINFO_DATA_OUT:
text = "=> Send data";
break;
case CURLINFO_HEADER_IN:
 text = "<= Recv header";
break;
case CURLINFO_DATA_IN:
 text = "<= Recv data";
break;
default: /* in case a new one is introduced to shock us */
return 0;
}

it is working fine but after few iterations im getting this assertion
error coming from the my_trace function
this is the error :

Debug Assertion Failed
Program: ..
File: mktime64.c
Line: 129

Expression: (tb !=NULL )

.......

im using VS 2005 express in multi thread debug dll mode
what can be the reason to that ?

thanks for helping
Received on 2008-05-20