Skip to content

Commit

Permalink
domain: init db connection in all processes
Browse files Browse the repository at this point in the history
If the db_mode says we should cache the dialog table and only reload it
in MI proceeses, the module would not initialize the db connection for
SIP workers/timers. This would prevent the mi_script from running the
mi() commands.
This fix initializes the db connection in all proceses, thus enabling
the reload behavior from any process.
  • Loading branch information
razvancrainea committed Jun 21, 2024
1 parent 182fafb commit e0d0f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/domain/domain_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static int mod_init(void)
static int child_init(int rank)
{
/* Check if database is needed by worker processes only */
if ( db_mode==0 && (rank>=1) ) {
if (rank >= 1) {
if (domain_db_init(&db_url)<0) {
LM_ERR("Unable to connect to the database\n");
return -1;
Expand Down

0 comments on commit e0d0f6b

Please sign in to comment.