Module: sip-router
Branch: 4.1
Commit: 77019552cf3e1d88b98620eedad2ce7fb4bbb469
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7701955…
Author: Hugh Waite <hugh.waite(a)acision.com>
Committer: Hugh Waite <hugh.waite(a)acision.com>
Date: Mon Jun 16 11:53:11 2014 +0100
registrar: Add check for contact header before checking outbound support
- Fixes crash when processing REGISTER without a contact
(cherry picked from commit c9301c99d3c9acb663023cf02393d0e7ed74c133)
---
modules/registrar/save.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/modules/registrar/save.c b/modules/registrar/save.c
index 18e6758..70b868b 100644
--- a/modules/registrar/save.c
+++ b/modules/registrar/save.c
@@ -910,6 +910,7 @@ int save(struct sip_msg* _m, udomain_t* _d, int _cflags, str *_uri)
}
if (reg_outbound_mode != REG_OUTBOUND_NONE
+ && _m->contact && _m->contact->parsed
&& !(parse_headers(_m, HDR_VIA2_F, 0) == -1 || _m->via2 == 0
|| _m->via2->error != PARSE_OK)) {
/* Outbound supported on server, and more than one Via: - not the first hop */