doc/
subfolder, the README file is autogenerated)Per the DB issue in #3218:
I've determined the commit where dialog with db_mode SHUTDOWN stopped working is 1ff86ff.
This is the change where PROC_POSTCHILDINIT
was enabled/used.
In dialog.c child_init()
, there is code that resets the DB mode to NONE if not running in the main process:
/* in DB_MODE_SHUTDOWN only PROC_MAIN will do a DB dump at the end, so
* for the rest of the processes will be the same as DB_MODE_NONE */
if (dlg_db_mode==DB_MODE_SHUTDOWN && rank!=PROC_MAIN)
dlg_db_mode = DB_MODE_NONE;
However, because PROC_POSTCHILDINIT has now been enabled for the module, this code effectively disables DB persistence as PROC_POSTCHILDINIT is called in the main process after PROC_MAIN.
I have modified the rank check to rank!=PROC_POSTCHILDINIT
and can confirm that DB persistence in SHUTDOWN mode is working once again.
Note that the PR changes the logic to:
if (dlg_db_mode==DB_MODE_SHUTDOWN && rank!=PROC_POSTCHILDINIT)
dlg_db_mode = DB_MODE_NONE;
Technically dlg_db_mode will be reset to DB_MODE_NONE when called with rank PROC_MAIN, but the value will be restored when PROC_POSTCHILDINIT is called. I assume this behavior is OK, but otherwise I can change it to:
if (dlg_db_mode==DB_MODE_SHUTDOWN && rank!=PROC_MAIN && rank!=PROC_POSTCHILDINIT)
dlg_db_mode = DB_MODE_NONE;
https://github.com/kamailio/kamailio/pull/3221
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.