[sr-dev] git:master:96478d66: modules/ims_usrloc_scscf: fixed initializer when searching for contact

Jason Penton jason.penton at gmail.com
Wed Jan 7 22:00:38 CET 2015


Module: kamailio
Branch: master
Commit: 96478d66b7d0f78fab7e1aea666b5310281f1f00
URL: https://github.com/kamailio/kamailio/commit/96478d66b7d0f78fab7e1aea666b5310281f1f00

Author: Jason Penton <jason.penton at gmail.com>
Committer: Jason Penton <jason.penton at gmail.com>
Date: 2015-01-07T22:59:55+02:00

modules/ims_usrloc_scscf: fixed initializer when searching for contact

---

Modified: modules/ims_usrloc_scscf/impurecord.c

---

Diff:  https://github.com/kamailio/kamailio/commit/96478d66b7d0f78fab7e1aea666b5310281f1f00.diff
Patch: https://github.com/kamailio/kamailio/commit/96478d66b7d0f78fab7e1aea666b5310281f1f00.patch

---

diff --git a/modules/ims_usrloc_scscf/impurecord.c b/modules/ims_usrloc_scscf/impurecord.c
index 9859796..9c5214b 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -641,7 +641,7 @@ static inline struct ucontact* contact_path_match(unsigned int slot, str* _c, st
 int get_ucontact(impurecord_t* _r, str* _c, str* _callid, str* _path, int _cseq, struct ucontact** _co) {
     unsigned int sl;
     ucontact_t* ptr;
-    int with_callid = 1;
+    int with_callid = 0;
     ptr = 0;
     *_co = 0;
 
@@ -676,7 +676,7 @@ int get_ucontact(impurecord_t* _r, str* _c, str* _callid, str* _path, int _cseq,
     if (ptr) {
 	LM_DBG("have partially found a contact\n");
         /* found -> check callid and cseq */
-        if (!with_callid || (ptr->callid.len == _callid->len
+        if (!with_callid || (_callid && ptr->callid.len == _callid->len
                 && memcmp(_callid->s, ptr->callid.s, _callid->len) == 0)) {
             if (_cseq < ptr->cseq) {
 		LM_DBG("cseq less than expected\n");




More information about the sr-dev mailing list