[sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)

Henning Westerholt notifications at github.com
Thu Oct 25 09:25:14 CEST 2018


About duplicating the concept from preload_udomain() - this is generally fine, but the purpose of this function is a different. The preload_udomain() loads entries during startup to keep them in the cache and expire them later during runtime. This is not used in mode DB_ONLY. If I understand your code correctly, it just load all the entries to call the expiry callback and then it is not needed anymore.

You call mem_insert_urecord(), this calls new_urecord(), and this allocates new memory with shm_malloc(). As you are running in DB_ONLY mode, you should not keep any urecord entries after the function completes according to my understanding of your patch.

I would suggest to execute your patch in Kamailio debugging mode, maybe add a bit of logging to the places I mentioned, and verify this allocation and de-allocation of the memory.

-- 
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/1683#issuecomment-432943165
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181025/e2339365/attachment.html>


More information about the sr-dev mailing list