[sr-dev] Question about textops

Mojtaba mespio at gmail.com
Wed Jun 24 11:56:21 CEST 2020


Hello,
Some confusing things while developing in Kamailio:
In is_method_f function in textops module, the code checks the HDR_CSEQ_F
in msg also, and if the method name appears in CSEQ_F, The result is
returned TRUE.
These question will  arise why in this function, the CSEQ field in message
will check?
if(parse_headers(msg, HDR_CSEQ_F, 0)!=0 || msg->cseq==NULL)
{
LM_ERR("cannot parse cseq header\n");
return -1; /* should it be 0 ?!?! */
}
if(m->s==0)
return (get_cseq(msg)->method_id&m->len)?1:-1;
else
return (get_cseq(msg)->method_id==METHOD_OTHER
&& get_cseq(msg)->method.len==m->len
&& (strncasecmp(get_cseq(msg)->method.s, m->s,
m->len)==0))?1:-1;

I think it would be nice to add new function like: is_cseq_method_f in
module to avoid some problem understanding.

-- 
--Mojtaba Esfandiari.S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200624/c05504fa/attachment.html>


More information about the sr-dev mailing list