X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Finit.c;h=79271d081bc24d7967d1d00a3612041ae945caf9;hb=95ea544e98c0ede188e62fddebefd0c755cd3b20;hp=8b0fad164dcef92878b4d08f3a17956bd43a256d;hpb=832f7de6ae6892559cf188033445a044e993326f;p=openldap diff --git a/servers/slapd/init.c b/servers/slapd/init.c index 8b0fad164d..79271d081b 100644 --- a/servers/slapd/init.c +++ b/servers/slapd/init.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2012 The OpenLDAP Foundation. + * Copyright 1998-2013 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -59,7 +59,8 @@ BerVarray default_referral = NULL; * global variables that need mutex protection */ ldap_pvt_thread_pool_t connection_pool; -int connection_pool_max = SLAP_MAX_WORKER_THREADS; +int connection_pool_max = SLAP_MAX_WORKER_THREADS; +int connection_pool_queues = 1; int slap_tool_thread_max = 1; slap_counters_t slap_counters, *slap_counters_list; @@ -135,8 +136,8 @@ slap_init( int mode, const char *name ) slap_name = name; - ldap_pvt_thread_pool_init( &connection_pool, - connection_pool_max, 0); + ldap_pvt_thread_pool_init_q( &connection_pool, + connection_pool_max, 0, connection_pool_queues); slap_counters_init( &slap_counters ); @@ -211,12 +212,15 @@ slap_init( int mode, const char *name ) int slap_startup( Backend *be ) { + int rc; Debug( LDAP_DEBUG_TRACE, "%s startup: initiated.\n", slap_name, 0, 0 ); - - return backend_startup( be ); + rc = backend_startup( be ); + if ( !rc && ( slapMode & SLAP_SERVER_MODE )) + slapMode |= SLAP_SERVER_RUNNING; + return rc; } int slap_shutdown( Backend *be )