Module: sip-router Branch: master Commit: df2d92a1f0698e0d108ec080de5fc3673d332209 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=df2d92a1...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Jul 1 17:40:20 2010 +0200
permissions(k): safety check for db_handle
- avoid double initialization of trusted ops db handler
---
modules_k/permissions/trusted.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules_k/permissions/trusted.c b/modules_k/permissions/trusted.c index d3c4860..77545ad 100644 --- a/modules_k/permissions/trusted.c +++ b/modules_k/permissions/trusted.c @@ -231,10 +231,10 @@ error: */ int init_child_trusted(int rank) { - if ((rank <= 0) && (rank != PROC_RPC) && (rank != PROC_UNIXSOCK)) + if ((rank <= 0) && (rank != PROC_RPC) && (rank != PROC_UNIXSOCK)) return 0;
- if (!db_url.s) { + if (!db_url.s || db_handle) { return 0; }