rem: DBG(" method:  <%s>\n",fl->u.request.method); DBG(" uri:     <%s>\n",fl->u.request.uri); DBG(" version: <%s>\n",fl->u.request.version);
add: DBG(" method:  <%s>\n",fl->u.request.method.s); DBG(" uri:     <%s>\n",fl->u.request.uri.s); DBG(" version: <%s>\n",fl->u.request.version.s);
context: int parse_msg(char* buf, unsigned int len, struct sip_msg* msg){	char *tmp, *bar;	char* rest;	char* first_via;	char* second_via;	struct msg_start *fl;	int offset;	int flags;	/* eat crlf from the beginning */	for (tmp=buf; (*tmp=='\n' || *tmp=='\r')&&			tmp-buf < len ; tmp++);	offset=tmp-buf;	fl=&(msg->first_line);	rest=parse_first_line(tmp, len-offset, fl);#if 0	rest=parse_fline(tmp, buf+len, fl);#endif	offset+=rest-tmp;	tmp=rest;	switch(fl->type){		case SIP_INVALID:			DBG("parse_msg: invalid message\n");			goto error;			break;		case SIP_REQUEST:			DBG("SIP Request:\n");			DBG(" method:  <%s>\n",fl->u.request.method);			DBG(" uri:     <%s>\n",fl->u.request.uri);			DBG(" version: <%s>\n",fl->u.request.version);			flags=HDR_VIA;			break;		case SIP_REPLY:			DBG("SIP Reply  (status):\n");			DBG(" version: <%s>\n",fl->u.reply.version);			DBG(" status:  <%s>\n",fl->u.reply.status);			DBG(" reason:  <%s>\n",fl->u.reply.reason);			flags=HDR_VIA|HDR_VIA2;			break;		default:			DBG("unknown type %d\n",fl->type);	}	msg->unparsed=tmp;	/*find first Via: */	first_via=0;	second_via=0;	if (parse_headers(msg, flags)==-1) goto error;#ifdef EXTRA_DEBUG	/* dump parsed data */	if (msg->via1){		DBG(" first  via: <%s/%s/%s> <%s:%s(%d)>",			msg->via1->name.s, msg->via1->version.s,			msg->via1->transport.s, msg->via1->host.s,			msg->via1->port_str, msg->via1->port);		if (msg->via1->params.s)  DBG(";<%s>", msg->via1->params.s);		if (msg->via1->comment.s) DBG(" <%s>", msg->via1->comment.s);		DBG ("\n");	}	if (msg->via2){		DBG(" first  via: <%s/%s/%s> <%s:%s(%d)>",			msg->via2->name.s, msg->via2->version.s,			msg->via2->transport.s, msg->via2->host.s,			msg->via2->port_str, msg->via2->port);		if (msg->via2->params.s)  DBG(";<%s>", msg->via2->params.s);		if (msg->via2->comment.s) DBG(" <%s>", msg->via2->comment.s);		DBG ("\n");	}#endif	#ifdef EXTRA_DEBUG	DBG("exiting parse_msg\n");#endif	return 0;	error:	return -1;}