andykimpe / rpms / 389-ds-base

Forked from rpms/389-ds-base 5 months ago
Clone

Blame SOURCES/0075-Ticket-48339-Share-nsslapd-threadnumber-in-the-case-.patch

246821
From 70cdfa2ef8bcb0e8bae1c18f69c42d99dff2b5be Mon Sep 17 00:00:00 2001
246821
From: Noriko Hosoi <nhosoi@redhat.com>
246821
Date: Thu, 5 Nov 2015 13:08:56 -0800
246821
Subject: [PATCH 75/75] Ticket #48339 - Share nsslapd-threadnumber in the case
246821
 nunc-stans is enabled, as well.
246821
246821
Description:  When nunc-stans is enabled, instead of getting the
246821
thread number from the environment variable MAX_THREADS, use the
246821
value of config parameter nsslapd-threadnumber.
246821
246821
https://fedorahosted.org/389/ticket/48339
246821
246821
Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
246821
246821
(cherry picked from commit ab8ed9a5ebb0d15b55d7525ed1d5dbeebd8c7563)
246821
(cherry picked from commit a4c0a9eeba031b9304d63ca05d8b9fab9ebca1b2)
246821
---
246821
 ldap/servers/slapd/daemon.c | 5 +----
246821
 1 file changed, 1 insertion(+), 4 deletions(-)
246821
246821
diff --git a/ldap/servers/slapd/daemon.c b/ldap/servers/slapd/daemon.c
246821
index bd3bfb2..5d70647 100644
246821
--- a/ldap/servers/slapd/daemon.c
246821
+++ b/ldap/servers/slapd/daemon.c
246821
@@ -1199,10 +1199,7 @@ void slapd_daemon( daemon_ports_t *ports )
246821
 #ifdef ENABLE_NUNC_STANS
246821
 	if (enable_nunc_stans && !g_get_shutdown()) {
246821
 		int ii;
246821
-		PRInt32 maxthreads = 3;
246821
-		if (getenv("MAX_THREADS")) {
246821
-			maxthreads = atoi(getenv("MAX_THREADS"));
246821
-		}
246821
+		PRInt32 maxthreads = (PRInt32)config_get_threadnumber();
246821
 		/* Set the nunc-stans thread pool config */
246821
 		ns_thrpool_config_init(&tp_config);
246821
 
246821
-- 
246821
2.4.3
246821