From 50da2ea87ceaabd2b9d6ef631c623cfcb3dcbdc2 Mon Sep 17 00:00:00 2001 From: Daniel-Constantin Mierla Date: Wed, 6 Jul 2016 15:48:58 +0200 Subject: [PATCH] dialog: open db connection from rpc processes - might be requered by rpc commands when db realtime is set - reported by Dirk Teurlings (cherry picked from commit a7e7486b57f1b9d025f09c055a3dc360c131fa5b) --- modules/dialog/dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c index 553715d380e..27734a365cf 100644 --- a/modules/dialog/dialog.c +++ b/modules/dialog/dialog.c @@ -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);