From: Kurt Zeilenga Date: Thu, 19 Aug 1999 18:55:01 +0000 (+0000) Subject: unifdef -DSLAP_CLEANUP X-Git-Tag: TWEB_OL_BASE~150 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e1630c79cd87749ea0d0a2984644a5ab78f36504;p=openldap unifdef -DSLAP_CLEANUP --- diff --git a/servers/slapd/back-ldbm/attr.c b/servers/slapd/back-ldbm/attr.c index aab4b27bde..ea7f85da1b 100644 --- a/servers/slapd/back-ldbm/attr.c +++ b/servers/slapd/back-ldbm/attr.c @@ -172,8 +172,6 @@ attr_index_config( } -#ifdef SLAP_CLEANUP - static void ainfo_free( void *attr ) { @@ -188,4 +186,3 @@ attr_index_destroy( Avlnode *tree ) avl_free( tree, ainfo_free ); } -#endif /* SLAP_CLEANUP */ diff --git a/servers/slapd/back-ldbm/cache.c b/servers/slapd/back-ldbm/cache.c index 530e9d9acf..66ecb5ba9b 100644 --- a/servers/slapd/back-ldbm/cache.c +++ b/servers/slapd/back-ldbm/cache.c @@ -672,8 +672,6 @@ cache_delete_entry_internal( return( 0 ); } -#ifdef SLAP_CLEANUP - void cache_release_all( Cache *cache ) { @@ -703,8 +701,6 @@ cache_release_all( Cache *cache ) ldap_pvt_thread_mutex_unlock( &cache->c_mutex ); } -#endif /* SLAP_CLEANUP */ - #ifdef LDAP_DEBUG static void diff --git a/servers/slapd/back-ldbm/close.c b/servers/slapd/back-ldbm/close.c index fe03f78404..37a5235780 100644 --- a/servers/slapd/back-ldbm/close.c +++ b/servers/slapd/back-ldbm/close.c @@ -20,9 +20,7 @@ ldbm_back_db_close( Backend *be ) ldbm_cache_flush_all( be ); Debug( LDAP_DEBUG_TRACE, "ldbm backend done syncing\n", 0, 0, 0 ); -#ifdef SLAP_CLEANUP cache_release_all( &((struct ldbminfo *) be->be_private)->li_cache ); -#endif return 0; } diff --git a/servers/slapd/back-ldbm/init.c b/servers/slapd/back-ldbm/init.c index 0949c0f0bd..ab29410fb6 100644 --- a/servers/slapd/back-ldbm/init.c +++ b/servers/slapd/back-ldbm/init.c @@ -171,7 +171,6 @@ ldbm_back_db_destroy( ) { /* should free/destroy every in be_private */ -#ifdef SLAP_CLEANUP struct ldbminfo *li = (struct ldbminfo *) be->be_private; free( li->li_directory ); attr_index_destroy( li->li_attrs ); @@ -182,8 +181,9 @@ ldbm_back_db_destroy( ldap_pvt_thread_mutex_destroy( &li->li_nextid_mutex ); ldap_pvt_thread_mutex_destroy( &li->li_dbcache_mutex ); ldap_pvt_thread_cond_destroy( &li->li_dbcache_cv ); -#endif /* SLAP_CLEANUP */ + free( be->be_private ); be->be_private = NULL; + return 0; } diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index 9e14f239d1..90ea6281d2 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -36,9 +36,7 @@ void attr_masks LDAP_P(( struct ldbminfo *li, char *type, int *indexmask, int *syntaxmask )); void attr_index_config LDAP_P(( struct ldbminfo *li, char *fname, int lineno, int argc, char **argv, int init )); -#ifdef SLAP_CLEANUP void attr_index_destroy LDAP_P(( Avlnode *tree )); -#endif /* * cache.c @@ -53,9 +51,7 @@ void cache_return_entry_rw LDAP_P(( Cache *cache, Entry *e, int rw )); ID cache_find_entry_dn2id LDAP_P(( Backend *be, Cache *cache, char *dn )); Entry * cache_find_entry_id LDAP_P(( Cache *cache, ID id, int rw )); int cache_delete_entry LDAP_P(( Cache *cache, Entry *e )); -#ifdef SLAP_CLEANUP void cache_release_all LDAP_P(( Cache *cache )); -#endif /* * dbcache.c