Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
Thank you, merged into master branch. -- 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-434455815___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
Merged #1683 into master. -- 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#event-1936204851___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
This is not a pure fix to a bug -- I said I am fine to merge it in this phase of testing the upcoming 5.2.0 release because it brings coherence with the other db modes. With git is easy to clone the repo and maintain back ports as you need. -- 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-434022674___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@miconda will this be backported to stable 4.4 branch? -- 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-434001837___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@henningw thanks for the review. removed redundant function call mem_insert_urecord from udomain_contact_expired_cb. -- 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-432997613___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@adil-mafzool pushed 1 commit. 7bbe159 usrloc: removed redundant function call mem_insert_urecord from udomain_contact_expired_cb -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1683/files/ee0b15be18509e6ea5e1385c2ba5c1f1ccbc51e8..7bbe15992cafc9cd3b88fb7b5f0742a8a91a2b08 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
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___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@miconda: Adding db_mode would be required since db_timer_udomain is now being called for different db_modes. @henningw: Had seen that but since the concept was duplicated from ``preload_udomain``` where ucontact was being freed where as urecord was not. It looks like urecord is using static memory function get_static_urecord and doesn't use shm_malloc. -- 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-432656159___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@adil-mafzool pushed 1 commit. 531e613 usrloc: only execute funtion udomain_contact_expired_cb when db_mode is set as DB_ONLY -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/kamailio/kamailio/pull/1683/files/8cf7bafd9639ce2dbc9d438b2f7a56befcfe7a11..531e613ed22ffb7bd903b25df62d0e8ff83c772d ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
@miconda: It is not strictly a bugfix - but as you said it brings coherence to the module with the other values for db_mode. So I have nothing against the exception to merge it now in the current phase of development. To addea module parameter is a good idea as well. @adil-mafzool: I have one question about your patch: you create both a new urecord and a ucontact in the timer callback function, and I think both are allocated in new memory. But you only cleanup the ucontact, not the urecord after the callback processing. Is this not necessary or it is cleanup at another place? -- 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-432540948___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
Thanks for the contribution! This will bring coherence with the other values for db_mode, so if the other devels have nothing against, it can be merged, even if we are in the freezing phase for v5.2.0. The only adjustment I would make is to add a mod param to control the execution of the new function, because it can be a lengthly execution when there are many records in the database and this functionality is not needed always. -- 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-432522965___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] usrloc: call contact expired call back for a domain with db_mode: DB_ONLY (#1683)
usrloc: call contact expired call back for a domain with db_mode: DB_ONLY; database rows are removed by the timer function: db_timer_udomain Pre-Submission Checklist - [ ] Commit message has the format required by CONTRIBUTING guide - [ ] Commits are split per component (core, individual modules, libs, utils, ...) - [ ] Each component has a single commit (if not, squash them into one commit) - [ ] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated) Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X ] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality) Checklist: - [ ] PR should be backported to stable branches - [ ] Tested changes locally - [ ] Related to issue # (replace with an open issue number) Description Currently call contact expired call back for a domain with db_mode: DB_ONLY doesn't callback function for "usrloc:contact-expired" to carry out call back application actions since database rows are removed by the timer function: db_timer_udomain. There is addition of new function udomain_contact_expired_cb which will only call the call back function when contact are being removed from the database. You can view, comment on, or merge this pull request online at: https://github.com/kamailio/kamailio/pull/1683 -- Commit Summary -- * usrloc: call contact expired call back for a domain with db_mode: DB_ONLY -- File Changes -- M src/modules/usrloc/udomain.c (172) -- Patch Links -- https://github.com/kamailio/kamailio/pull/1683.patch https://github.com/kamailio/kamailio/pull/1683.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/1683 ___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev