Skip to content

Commit

Permalink
dialog: open db connection from rpc processes
Browse files Browse the repository at this point in the history
- might be requered by rpc commands when db realtime is set
- reported by Dirk Teurlings

(cherry picked from commit a7e7486)
  • Loading branch information
miconda committed Jul 6, 2016
1 parent 7c10878 commit 50da2ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/dialog/dialog.c
Expand Up @@ -743,7 +743,7 @@ static int child_init(int rank)
}

if ( ((dlg_db_mode==DB_MODE_REALTIME || dlg_db_mode==DB_MODE_DELAYED) &&
(rank>0 || rank==PROC_TIMER)) ||
(rank>0 || rank==PROC_TIMER || rank==PROC_RPC)) ||
(dlg_db_mode==DB_MODE_SHUTDOWN && (rank==PROC_MAIN)) ) {
if ( dlg_connect_db(&db_url) ) {
LM_ERR("failed to connect to database (rank=%d)\n",rank);
Expand Down

0 comments on commit 50da2ea

Please sign in to comment.