rem: it = it->next;
context: int xl_print_log(struct sip_msg* msg, xl_elog_p log, char *buf, int *len){	int n;	str tok;	xl_elog_p it;		if(msg==NULL || log==NULL || buf==NULL || len==NULL)		return -1;	if(*len <= 0)		return -1;	it = log;	buf[0] = '\0';	n = 0;	while(it)	{		// put the text		if(it->text.s && it->text.len>0)		{			if(n+it->text.len < *len)			{				strncat(buf, it->text.s, it->text.len);				n += it->text.len;			}			else				goto overflow;		}		// put the value of the specifier		if(it->itf && !((*it->itf)(msg, &tok)))		{			if(n+tok.len < *len)			{				strncat(buf, tok.s, tok.len);				n += tok.len;			}			else				goto overflow;		}		it = it->next;	}	goto done;	overflow:	DBG("XLOG: xl_print_log: buffer overflow ...\n");done:	DBG("XLOG: xl_print_log: final buffer length %d\n", n);	*len = n;	return 0;}