[sr-dev] [kamailio/kamailio] Improvements on DB handling on S-CSCF usrloc (#730)

Federico Favaro notifications at github.com
Mon Aug 1 15:17:40 CEST 2016


Some improvements on the handling of contacts on S-CSCF database, namely
* Clean the contact table at startup if impu_contact table is empty
* if the contact is in state DELAYED_DELETE but still has ref_count > 0 in memory, it could mean that it has not been decremented before due to a failure to get a lock. This way we are leaking a contact on the DB and in memory. When the contact is expired and in DELAYED_DELETE, we do a query to check if it is really still referenced on impu_contact table. If not, we mark contact for deletion. 
* Add an helper function to print the actual state of a contact instead of the index of the enum
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/730

-- Commit Summary --

  * ims_usrloc_scscf: Remove all unlinked contacts
  * ims_usrloc_scscf: Double check contact refs on DB
  * ims_usrloc_scscf: Print contact state as string

-- File Changes --

    M modules/ims_usrloc_scscf/udomain.c (26)
    M modules/ims_usrloc_scscf/usrloc.h (17)
    M modules/ims_usrloc_scscf/usrloc_db.c (72)
    M modules/ims_usrloc_scscf/usrloc_db.h (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/730.patch
https://github.com/kamailio/kamailio/pull/730.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160801/6fe63380/attachment.html>


More information about the sr-dev mailing list