Module: sip-router
Branch: master
Commit: be92c6713c2b7c7cb04320758a346ba6a1324982
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=be92c67…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Jan 18 20:16:31 2011 +0100
permissions(k): do not check db con in child init
- proper connection is returned by comparison of pids
---
modules_k/permissions/address.c | 2 +-
modules_k/permissions/trusted.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules_k/permissions/address.c b/modules_k/permissions/address.c
index ccdbf1a..3db6e58 100644
--- a/modules_k/permissions/address.c
+++ b/modules_k/permissions/address.c
@@ -287,7 +287,7 @@ error:
*/
int mi_init_addresses(void)
{
- if (!db_url.s || db_handle) return 0;
+ if (!db_url.s) return 0;
db_handle = perm_dbf.init(&db_url);
if (!db_handle) {
LM_ERR("unable to connect database\n");
diff --git a/modules_k/permissions/trusted.c b/modules_k/permissions/trusted.c
index 33cae33..1f8a106 100644
--- a/modules_k/permissions/trusted.c
+++ b/modules_k/permissions/trusted.c
@@ -235,7 +235,7 @@ int init_child_trusted(int rank)
if ((rank <= 0) && (rank != PROC_RPC) && (rank != PROC_UNIXSOCK))
return 0;
- if (!db_url.s || db_handle) {
+ if (!db_url.s) {
return 0;
}
@@ -261,7 +261,7 @@ int init_child_trusted(int rank)
*/
int mi_init_trusted(void)
{
- if (!db_url.s || db_handle) return 0;
+ if (!db_url.s) return 0;
db_handle = perm_dbf.init(&db_url);
if (!db_handle) {
LM_ERR("unable to connect database\n");