Module: sip-router
Branch: master
Commit: c65fc04ff83c6304d5889f3426b3b96b5ac7ee69
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c65fc04…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jul 1 18:35:27 2010 +0200
domain(k): safety check for db handler initialization
- avoid double initialization of db handler when using xmlrpc module for
mi commands
---
modules_k/domain/domain.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules_k/domain/domain.c b/modules_k/domain/domain.c
index 942a6ce..3e71c35 100644
--- a/modules_k/domain/domain.c
+++ b/modules_k/domain/domain.c
@@ -63,6 +63,9 @@ int domain_db_init(const str* db_url)
LM_ERR("Unbound database module\n");
goto error;
}
+ if (db_handle!=0)
+ return 0;
+
db_handle=domain_dbf.init(db_url);
if (db_handle==0){
LM_ERR("Cannot initialize database connection\n");