[sr-dev] git:master:850b7459: ims_usrloc_scscf: Remove first Entry, if maxcontacts reached and maxcontact_behaviour is 2 (delete oldest)

Carsten Bock carsten at ng-voice.com
Fri Oct 23 19:53:22 CEST 2015


Module: kamailio
Branch: master
Commit: 850b7459ec3fc04cf7e2e54038fcf4f12dcf797d
URL: https://github.com/kamailio/kamailio/commit/850b7459ec3fc04cf7e2e54038fcf4f12dcf797d

Author: Carsten Bock <carsten at ng-voice.com>
Committer: Carsten Bock <carsten at ng-voice.com>
Date: 2015-10-23T19:50:15+02:00

ims_usrloc_scscf: Remove first Entry, if maxcontacts reached and maxcontact_behaviour is 2 (delete oldest)

---

Modified: modules/ims_usrloc_scscf/impurecord.c

---

Diff:  https://github.com/kamailio/kamailio/commit/850b7459ec3fc04cf7e2e54038fcf4f12dcf797d.diff
Patch: https://github.com/kamailio/kamailio/commit/850b7459ec3fc04cf7e2e54038fcf4f12dcf797d.patch

---

diff --git a/modules/ims_usrloc_scscf/impurecord.c b/modules/ims_usrloc_scscf/impurecord.c
index 6d2869e..ba6141c 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -478,7 +478,7 @@ int insert_scontact(impurecord_t* _r, str* _contact, ucontact_info_t* _ci, ucont
                 case 2://overwrite oldest
                     LM_DBG("Too many contacts already registered, overwriting oldest for IMPU <%.*s>\n", _r->public_identity.len, _r->public_identity.s);
                     //we can just remove the first one seeing the contacts are ordered on insertion with newest last and oldest first
-                    //TODO:mem_delete_ucontact(_r, _r->contacts);
+		    mem_delete_ucontact(_r->newcontacts[0]);
                     break;
                 default://unknown
                     LM_ERR("unknown maxcontact behaviour..... ignoring\n");




More information about the sr-dev mailing list