Blob Blame History Raw
From 70cdfa2ef8bcb0e8bae1c18f69c42d99dff2b5be Mon Sep 17 00:00:00 2001
From: Noriko Hosoi <nhosoi@redhat.com>
Date: Thu, 5 Nov 2015 13:08:56 -0800
Subject: [PATCH 75/75] Ticket #48339 - Share nsslapd-threadnumber in the case
 nunc-stans is enabled, as well.

Description:  When nunc-stans is enabled, instead of getting the
thread number from the environment variable MAX_THREADS, use the
value of config parameter nsslapd-threadnumber.

https://fedorahosted.org/389/ticket/48339

Reviewed by rmeggins@redhat.com (Thank you, Rich!!)

(cherry picked from commit ab8ed9a5ebb0d15b55d7525ed1d5dbeebd8c7563)
(cherry picked from commit a4c0a9eeba031b9304d63ca05d8b9fab9ebca1b2)
---
 ldap/servers/slapd/daemon.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
index bd3bfb2..5d70647 100644
--- a/ldap/servers/slapd/daemon.c
+++ b/ldap/servers/slapd/daemon.c
@@ -1199,10 +1199,7 @@ void slapd_daemon( daemon_ports_t *ports )
 #ifdef ENABLE_NUNC_STANS
 	if (enable_nunc_stans && !g_get_shutdown()) {
 		int ii;
-		PRInt32 maxthreads = 3;
-		if (getenv("MAX_THREADS")) {
-			maxthreads = atoi(getenv("MAX_THREADS"));
-		}
+		PRInt32 maxthreads = (PRInt32)config_get_threadnumber();
 		/* Set the nunc-stans thread pool config */
 		ns_thrpool_config_init(&tp_config);
 
-- 
2.4.3