浏览代码

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
Daniel-Constantin Mierla 14 年之前
父节点
当前提交
6faec77af3
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      modules_k/ldap/ldap_mod.c

+ 2 - 3
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