Hello,
what is missing? What is highlighted seems to be in the code.
Can you provide a patch or make a pull request on github project? That
will make it simpler to understand what you want to change.
Cheers,
Daniel
On 07/06/16 11:51, Surendra.P wrote:
Hello Daniel,
Switch case control is missing while parsing MSRP
pseudo variables. Please find the code snippet below:
int pv_parse_msrp_name(pv_spec_t *sp, str *in)
{
if(sp==NULL || in==NULL || in->len<=0)
return -1;
switch(in->len)
{
case 3:
if(strncmp(in->s, "buf", 3)==0)
sp->pvp.pvn.u.isname.name.n = 1;
else goto error;
break;
case 4:
if(strncmp(in->s, "body", 4)==0)
sp->pvp.pvn.u.isname.name.n = 2;
else if(strncmp(in->s, "code", 4)==0)
sp->pvp.pvn.u.isname.name.n = 3;
else if(strncmp(in->s, "hdrs", 4)==0)
sp->pvp.pvn.u.isname.name.n = 4;
else goto error;
break;
case 5:
if(strncmp(in->s, "msgid", 5)==0)
sp->pvp.pvn.u.isname.name.n = 5;
else if(strncmp(in->s, "conid", 5)==0)
sp->pvp.pvn.u.isname.name.n = 21;
else goto error;
case 6:
if(strncmp(in->s, "method", 6)==0)
sp->pvp.pvn.u.isname.name.n = 6;
else if(strncmp(in->s, "buflen", 6)==0)
sp->pvp.pvn.u.isname.name.n = 7;
else if(strncmp(in->s, "sessid", 6)==0)
sp->pvp.pvn.u.isname.name.n = 8;
else if(strncmp(in->s, "reason", 6)==0)
sp->pvp.pvn.u.isname.name.n = 9;
else if(strncmp(in->s, "crthop", 6)==0)
sp->pvp.pvn.u.isname.name.n = 12;
else goto error;
break;
Regards
Surendra
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users