Module: sip-router
Branch: master
Commit: 6369444761d44526ded2620e33438abb182d2bdc
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6369444…
Author: Olle E. Johansson <oej(a)edvina.net>
Committer: Olle E. Johansson <oej(a)edvina.net>
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)
{