Module: kamailio
Branch: 4.4
Commit: 50da2ea87ceaabd2b9d6ef631c623cfcb3dcbdc2
URL:
https://github.com/kamailio/kamailio/commit/50da2ea87ceaabd2b9d6ef631c623cf…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-06T15:52:04+02:00
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)
---
Modified: modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/50da2ea87ceaabd2b9d6ef631c623cf…
Patch:
https://github.com/kamailio/kamailio/commit/50da2ea87ceaabd2b9d6ef631c623cf…
---
diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c
index 553715d..27734a3 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);