[sr-dev] git:master: ldap(k): connect to server for negative ranks

Daniel-Constantin Mierla miconda at gmail.com
Tue Dec 28 11:40:58 CET 2010


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Dec 28 11:38:57 2010 +0100

ldap(k): connect to server for negative ranks

- there are some processes with negative rank that need connection to
  ldap server, like timers
- reported by Pan Christensen

---

 modules_k/ldap/ldap_mod.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules_k/ldap/ldap_mod.c b/modules_k/ldap/ldap_mod.c
index 81f81f6..1ac942a 100644
--- a/modules_k/ldap/ldap_mod.c
+++ b/modules_k/ldap/ldap_mod.c
@@ -157,10 +157,9 @@ static int child_init(int rank)
 	int i = 0, ld_count = 0;
 	char* ld_name;
 	
-	/* don't do anything for non-worker process */
-	if (rank < 1) {
+	/* don't do anything for non-worker processes */
+	if (rank==PROC_INIT || rank==PROC_MAIN || rank==PROC_TCP_MAIN)
 		return 0;
-	}
 
 	/*
 	* build ld_sessions and connect all sessions




More information about the sr-dev mailing list