[sr-dev] git:master: pdt(k): don't safety check the db con in child init

Daniel-Constantin Mierla miconda at gmail.com
Sat Jan 15 12:35:27 CET 2011


Module: sip-router
Branch: master
Commit: 6da5a7a363590b4830d841125cb7e354ec376d10
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6da5a7a363590b4830d841125cb7e354ec376d10

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat Jan 15 12:25:45 2011 +0100

pdt(k): don't safety check the db con in child init

- proper db connection is returned based on pid condition

---

 modules_k/pdt/pdt.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/modules_k/pdt/pdt.c b/modules_k/pdt/pdt.c
index a5eeed4..cfc3930 100644
--- a/modules_k/pdt/pdt.c
+++ b/modules_k/pdt/pdt.c
@@ -275,10 +275,7 @@ error1:
  */
 static int mi_child_init(void)
 {
-	/* check if db handler is initialized */
-	if(db_con!=NULL)
-		return 0;
-
+	/* db handler initialization */
 	db_con = pdt_dbf.init(&db_url);
 	if(db_con==NULL)
 	{




More information about the sr-dev mailing list