Module: sip-router
Branch: 3.1
Commit: 1e204f4bbcc84271f509838182539476577fc77a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1e204f4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Nov 30 23:16:19 2010 +0100
drouting: do not call init child for PROC_INIT
- avoid opening a database connection before forking
- reported by several people in context of Postgress async lib calls
(cherry picked from commit 907936449b2543966a5b3b2fe821d406c2293799)
---
modules_k/drouting/drouting.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/drouting/drouting.c b/modules_k/drouting/drouting.c
index 45f36c2..aa09ef4 100644
--- a/modules_k/drouting/drouting.c
+++ b/modules_k/drouting/drouting.c
@@ -411,7 +411,7 @@ error:
static int dr_child_init(int rank)
{
/* only workers needs DB connection */
- if (rank==PROC_MAIN || rank==PROC_TCP_MAIN)
+ if (rank==PROC_MAIN || rank==PROC_TCP_MAIN || rank==PROC_INIT)
return 0;
/* init DB connection */