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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
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
(cherry picked from commit 6faec77af3e839314ce9de59b8413e73f0266c25)

---

 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


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to