CFG_SASLSECP,
CFG_SSTR_IF_MAX,
CFG_SSTR_IF_MIN,
+ CFG_TTHREADS,
CFG_LAST
};
#endif
"( OLcfgGlAt:77 NAME 'olcTLSDHParamDir' "
"SYNTAX OMsDirectoryString SINGLE-VALUE )", NULL, NULL },
+ { "tool-threads", "count", 2, 2, 0, ARG_INT|ARG_MAGIC|CFG_TTHREADS,
+ &config_generic, "( OLcfgGlAt:80 NAME 'olcToolThreads' "
+ "SYNTAX OMsInteger SINGLE-VALUE )", NULL, NULL },
{ "ucdata-path", "path", 2, 2, 0, ARG_IGNORED,
NULL, NULL, NULL, NULL },
{ "updatedn", "dn", 2, 2, 0, ARG_DB|ARG_DN|ARG_QUOTE|ARG_MAGIC,
"olcTLSCACertificatePath $ olcTLSCertificateFile $ "
"olcTLSCertificateKeyFile $ olcTLSCipherSuite $ olcTLSCRLCheck $ "
"olcTLSRandFile $ olcTLSVerifyClient $ olcTLSDHParamDir $ "
+ "olcToolThreads $ "
"olcObjectIdentifier $ olcAttributeTypes $ olcObjectClasses $ "
"olcDitContentRules ) )", Cft_Global },
{ "( OLcfgGlOc:2 "
case CFG_THREADS:
c->value_int = connection_pool_max;
break;
+ case CFG_TTHREADS:
+ c->value_int = slap_tool_thread_max;
+ break;
case CFG_SALT:
if ( passwd_salt )
c->value_string = ch_strdup( passwd_salt );
/* single-valued attrs, no-ops */
case CFG_CONCUR:
case CFG_THREADS:
+ case CFG_TTHREADS:
case CFG_RO:
case CFG_AZPOLICY:
case CFG_DEPTH:
connection_pool_max = c->value_int; /* save for reference */
break;
+ case CFG_TTHREADS:
+ ldap_pvt_thread_pool_maxthreads(&connection_pool, c->value_int);
+ slap_tool_thread_max = c->value_int; /* save for reference */
+ break;
+
case CFG_SALT:
if ( passwd_salt ) ch_free( passwd_salt );
passwd_salt = c->value_string;
*/
ldap_pvt_thread_pool_t connection_pool;
int connection_pool_max = SLAP_MAX_WORKER_THREADS;
+int slap_tool_thread_max = 1;
#ifndef HAVE_GMTIME_R
ldap_pvt_thread_mutex_t gmtime_mutex;
#endif
switch ( slapMode & SLAP_MODE ) {
case SLAP_SERVER_MODE:
- ldap_pvt_thread_pool_init( &connection_pool,
- connection_pool_max, 0);
/* FALLTHRU */
case SLAP_TOOL_MODE:
slap_name = name;
+ ldap_pvt_thread_pool_init( &connection_pool,
+ connection_pool_max, 0);
+
ldap_pvt_thread_mutex_init( &entry2str_mutex );
ldap_pvt_thread_mutex_init( &replog_mutex );