20 feb 2013 kl. 10:37 skrev Peter Dunkley <[email protected]>:

> Hi Olle,
> 
> I don't think this fix is correct.  The purpose of checking msg->contact is 
> to see if the contact has been parsed already - it does not tell you whether 
> there is a contact in the message or not.
> 
> With this patch Kamailio might not be crashing, but that conditional is now 
> checking the wrong thing.
Somehow it sent a NULL pointer to parse_contact, which should not happen. So 
you need to check if contact exists before checking if it's parsed. If you need 
the coredump backtrace or some logs I have it.

/O
> 
> Regards,
> 
> Peter
> 
> On 19 Feb 2013, at 22:10, Olle E. Johansson <[email protected]> wrote:
> 
>> Module: sip-router
>> Branch: master
>> Commit: 6369444761d44526ded2620e33438abb182d2bdc
>> URL:    
>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6369444761d44526ded2620e33438abb182d2bdc
>> 
>> Author: Olle E. Johansson <[email protected]>
>> Committer: Olle E. Johansson <[email protected]>
>> Date:   Tue Feb 19 23:08:13 2013 +0100
>> 
>> outbound Fix core dump crash
>> 
>> When we got a CANCEL without Contact the parse_contact was sent a null
>> pointer. Changing the "or" to "and" fixed this and Kamailio no longer cores
>> on Cancel coming on over websockets from jssip.
>> 
>> Tested at SIPit 30. Core dumps and backtraces available.
>> Pdunkley - please check this patch
>> 
>> ---
>> 
>> modules/outbound/ob_mod.c |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
>> index caf10f4..f7fd63f 100644
>> --- a/modules/outbound/ob_mod.c
>> +++ b/modules/outbound/ob_mod.c
>> @@ -294,7 +294,7 @@ int use_outbound(struct sip_msg *msg)
>> 
>>   /* Look for ;reg-id in REGISTER Contact-URIs and ;ob in any
>>      Contact-URIs */
>> -    if (msg->contact || parse_headers(msg, HDR_CONTACT_F, 0) != -1)
>> +    if (msg->contact && parse_headers(msg, HDR_CONTACT_F, 0) != -1)
>>   {
>>       if (parse_contact(msg->contact) < 0)
>>       {
>> 
>> 
>> _______________________________________________
>> sr-dev mailing list
>> [email protected]
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to