Module: sip-router
Branch: master
Commit: c9301c99d3c9acb663023cf02393d0e7ed74c133
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c9301c99d3c9acb663023cf02393d0e7ed74c133

Author: Hugh Waite <[email protected]>
Committer: Hugh Waite <[email protected]>
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

---

 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 */


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

Reply via email to