Module: sip-router
Branch: master
Commit: 098deec785ab7c4e927104e83fc84b6c1b347719
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=098deec…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jul 1 19:08:04 2010 +0200
presence_xml: avoid re-init of db handler
- safety check for usage of xmlrpc module for mi cmds
---
modules_k/presence_xml/presence_xml.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules_k/presence_xml/presence_xml.c
b/modules_k/presence_xml/presence_xml.c
index ab3f8f3..dbea378 100644
--- a/modules_k/presence_xml/presence_xml.c
+++ b/modules_k/presence_xml/presence_xml.c
@@ -277,6 +277,8 @@ static int mi_child_init(void)
LM_CRIT("database not bound\n");
return -1;
}
+ if(pxml_db)
+ return 0;
pxml_db = pxml_dbf.init(&db_url);
if (pxml_db== NULL)
{
@@ -310,6 +312,8 @@ static int child_init(int rank)
LM_CRIT("database not bound\n");
return -1;
}
+ if(pxml_db)
+ return 0;
pxml_db = pxml_dbf.init(&db_url);
if (pxml_db== NULL)
{