[SR-Users] Question about textops

Mojtaba mespio at gmail.com
Fri Jun 26 12:42:45 CEST 2020


Any idea?

On Wed, 24 Jun 2020, 14:26 Mojtaba, <mespio at gmail.com> wrote:

> 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-users/attachments/20200626/a15cd199/attachment.html>


More information about the sr-users mailing list