[SR-Users] Problem to verify contact header

marius zbihlei marius.zbihlei at 1and1.ro
Thu Dec 8 16:35:49 CET 2011


On 12/07/2011 06:45 PM, Bruno Bresciani wrote:
> this line is present in a module that i am writting, but on 
> modules_k/pua_bla/notify.c line 205 has a similar condition...
>
> Cheers
>
607af7c7 (Henning Westerholt       2008-08-07 08:39:24 +0000 203)       
if(msg->contact== NULL || msg->contact->body.s== NULL)

As you can see, it test if it _is_ NULL (==) not different (!=).

Marius

>
> 2011/12/7 marius zbihlei <marius.zbihlei at 1and1.ro 
> <mailto:marius.zbihlei at 1and1.ro>>
>
>     On 12/07/2011 06:24 PM, Bruno Bresciani wrote:
>
>         Hi All,
>
>         Kamailio generate a core at line below
>
>         if(_msg->contact!= NULL || _msg->contact->body.s!= NULL){
>
>         _msg is a sip_msg struct that my module receive from kamailio.
>         I want verify if on that request messagem have a contact
>         header, but a core is being generated when contact header
>         isn't present on message.
>
>         Someone knows why this is happening?
>
>         Cheers
>
>     Hello,
>
>     Looks like a bug. Can you also point to  the source file where
>     this line is present. It certainly looks like a typo. I've tried
>     grepping over the latest 3.2 but to no avail.
>
>     Cheers,
>     Marius
>
>     -- 
>     Zbihlei Marius
>
>     Head of
>     Linux Development Services Romania
>
>     1&1 Internet Development srl    Tel KA: 754-9512
>     Str Mircea Eliade 18            Tel RO: +40-31-223-9512
>     <tel:%2B40-31-223-9512>
>     Sect 1, Bucuresti               mailto: marius.zbihlei at 1and1.ro
>     <mailto:marius.zbihlei at 1and1.ro>
>     71295, Romania
>
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>


-- 
Zbihlei Marius

Head of
Linux Development Services Romania

1&1 Internet Development srl    Tel KA: 754-9512
Str Mircea Eliade 18            Tel RO: +40-31-223-9512
Sect 1, Bucuresti               mailto: marius.zbihlei at 1and1.ro
71295, Romania

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20111208/4a0d5ac6/attachment.htm>


More information about the sr-users mailing list