From 8f7fbfe60ac1918e1fd6eb2ceea9c20119e18a49 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 4 Nov 2005 02:52:14 +0000 Subject: [PATCH] ITS#4143 bdb_tool_info should only be non-NULL for QUICK index/add --- servers/slapd/back-bdb/tools.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servers/slapd/back-bdb/tools.c b/servers/slapd/back-bdb/tools.c index d3701e1593..9dbb549afc 100644 --- a/servers/slapd/back-bdb/tools.c +++ b/servers/slapd/back-bdb/tools.c @@ -93,10 +93,10 @@ int bdb_tool_entry_open( } } - /* Set up for slapindex */ - if ( !(slapMode & SLAP_TOOL_READONLY )) { - int i; - if ( !bdb_tool_info && ( slapMode & SLAP_TOOL_QUICK )) { + /* Set up for threaded slapindex */ + if (( slapMode & (SLAP_TOOL_QUICK|SLAP_TOOL_READONLY)) == SLAP_TOOL_QUICK) { + if ( !bdb_tool_info ) { + int i; ldap_pvt_thread_mutex_init( &bdb_tool_index_mutex ); ldap_pvt_thread_cond_init( &bdb_tool_index_cond ); bdb_tool_index_threads = ch_malloc( slap_tool_thread_max * sizeof( int ));