Module: sip-router Branch: master Commit: 8a1d985743fe6ec544a215b8ddb6e54adbb024d9 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8a1d9857...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Jul 1 19:07:18 2010 +0200
presence: avoid re-init of db handler
- safety check for usage of xmlrpc for mi cmds
---
modules_k/presence/presence.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules_k/presence/presence.c b/modules_k/presence/presence.c index a07cf21..b826e39 100644 --- a/modules_k/presence/presence.c +++ b/modules_k/presence/presence.c @@ -363,6 +363,8 @@ static int child_init(int rank) LM_CRIT("child_init: database not bound\n"); return -1; } + if (pa_db) + return 0; pa_db = pa_dbf.init(&db_url); if (!pa_db) { @@ -404,6 +406,8 @@ static int mi_child_init(void) LM_CRIT("database not bound\n"); return -1; } + if (pa_db) + return 0; pa_db = pa_dbf.init(&db_url); if (!pa_db) {