From 464af5aeeb19d9ef6830858f468d12d9d96424f1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 6 Apr 2004 12:21:49 +0000 Subject: [PATCH] Don't try to use runqueue in SLAP_TOOL_MODE --- servers/slapd/overlays/pcache.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index a2679836f0..ff1964b7fc 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1870,10 +1870,13 @@ proxy_cache_open( rc = cm->db.bd_info->bi_db_open( &cm->db ); } - ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex ); - ldap_pvt_runqueue_insert( &syncrepl_rq, cm->cc_period, - consistency_check, on ); - ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex ); + /* There is no runqueue in TOOL mode */ + if ( slapMode & SLAP_SERVER_MODE ) { + ldap_pvt_thread_mutex_lock( &syncrepl_rq.rq_mutex ); + ldap_pvt_runqueue_insert( &syncrepl_rq, cm->cc_period, + consistency_check, on ); + ldap_pvt_thread_mutex_unlock( &syncrepl_rq.rq_mutex ); + } return rc; } -- 2.39.5