Module: sip-router
Branch: master
Commit: d60f872ac4ae3b656585ceac69c15d536131ec92
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d60f872…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Jul 1 00:10:22 2009 +0200
domain: init db connection for RPC process
- make mi commands to work properly via RPC interface
- reported by Juha Heinanen
---
modules_k/domain/domain_mod.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/domain/domain_mod.c b/modules_k/domain/domain_mod.c
index 0054181..431f5ab 100644
--- a/modules_k/domain/domain_mod.c
+++ b/modules_k/domain/domain_mod.c
@@ -212,7 +212,7 @@ error:
static int child_init(int rank)
{
/* Check if database is needed by child */
- if ( db_mode==0 && rank>0 ) {
+ if ( (db_mode==0 && rank>0) || (rank==PROC_RPC) ) {
if (domain_db_init(&db_url)<0) {
LM_ERR("Unable to connect to the database\n");
return -1;