}
-#ifdef SLAP_CLEANUP
-
static void
ainfo_free( void *attr )
{
avl_free( tree, ainfo_free );
}
-#endif /* SLAP_CLEANUP */
return( 0 );
}
-#ifdef SLAP_CLEANUP
-
void
cache_release_all( Cache *cache )
{
ldap_pvt_thread_mutex_unlock( &cache->c_mutex );
}
-#endif /* SLAP_CLEANUP */
-
#ifdef LDAP_DEBUG
static void
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;
}
)
{
/* 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 );
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;
}
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
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