Module: kamailio Branch: master Commit: a7e7486b57f1b9d025f09c055a3dc360c131fa5b URL: https://github.com/kamailio/kamailio/commit/a7e7486b57f1b9d025f09c055a3dc360...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2016-07-06T15:48:58+02:00
dialog: open db connection from rpc processes
- might be requered by rpc commands when db realtime is set - reported by Dirk Teurlings
---
Modified: modules/dialog/dialog.c
---
Diff: https://github.com/kamailio/kamailio/commit/a7e7486b57f1b9d025f09c055a3dc360... Patch: https://github.com/kamailio/kamailio/commit/a7e7486b57f1b9d025f09c055a3dc360...
---
diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c index 57d69a0..e781708 100644 --- a/modules/dialog/dialog.c +++ b/modules/dialog/dialog.c @@ -745,7 +745,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);