Module: sip-router Branch: master Commit: 2e8d469de4253444d61cb186395d40c0fd492fe6 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2e8d469d...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Jul 1 18:15:33 2010 +0200
pdt(k): safety check for db handler initialization
- there can be two attepts to initialize if xmlrpc module is loaded
---
modules_k/pdt/pdt.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules_k/pdt/pdt.c b/modules_k/pdt/pdt.c index 7f2dfda..fedd0d6 100644 --- a/modules_k/pdt/pdt.c +++ b/modules_k/pdt/pdt.c @@ -269,6 +269,10 @@ error1:
static int child_init(void) { + /* check if db handler is initialized */ + if(db_con!=NULL) + return 0; + db_con = pdt_dbf.init(&db_url); if(db_con==NULL) {