From 6cf0c94845f36a0b7436c4556cff76e2e76efcf2 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 7 Feb 2003 15:20:57 +0000 Subject: [PATCH] some (poor) index cleanup --- servers/slapd/back-ldbm/dbcache.c | 2 ++ servers/slapd/back-ldbm/idl.c | 2 ++ servers/slapd/back-ldbm/proto-back-ldbm.h | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/servers/slapd/back-ldbm/dbcache.c b/servers/slapd/back-ldbm/dbcache.c index 722b5d0635..921a02f382 100644 --- a/servers/slapd/back-ldbm/dbcache.c +++ b/servers/slapd/back-ldbm/dbcache.c @@ -325,6 +325,7 @@ ldbm_cache_sync( Backend *be ) ldap_pvt_thread_mutex_unlock( &li->li_dbcache_mutex ); } +#if 0 /* macro in proto-back-ldbm.h */ Datum ldbm_cache_fetch( DBCache *db, @@ -333,6 +334,7 @@ ldbm_cache_fetch( { return ldbm_fetch( db->dbc_db, key ); } +#endif /* 0 */ int ldbm_cache_store( diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index a3b0e89382..d879f568a6 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -259,6 +259,8 @@ idl_fetch( } free( (char *) tmp ); + assert( ID_BLOCK_NIDS(idl) == nids ); + #ifdef LDBM_DEBUG_IDL idl_check(idl); #endif diff --git a/servers/slapd/back-ldbm/proto-back-ldbm.h b/servers/slapd/back-ldbm/proto-back-ldbm.h index d8a0123b95..dfd531629d 100644 --- a/servers/slapd/back-ldbm/proto-back-ldbm.h +++ b/servers/slapd/back-ldbm/proto-back-ldbm.h @@ -68,7 +68,11 @@ void ldbm_cache_close LDAP_P(( Backend *be, DBCache *db )); void ldbm_cache_really_close LDAP_P(( Backend *be, DBCache *db )); void ldbm_cache_flush_all LDAP_P(( Backend *be )); void ldbm_cache_sync LDAP_P(( Backend *be )); +#if 0 /* replaced by macro */ Datum ldbm_cache_fetch LDAP_P(( DBCache *db, Datum key )); +#else /* 1 */ +#define ldbm_cache_fetch( db, key ) ldbm_fetch( (db)->dbc_db, (key) ) +#endif /* 1 */ int ldbm_cache_store LDAP_P(( DBCache *db, Datum key, Datum data, int flags )); int ldbm_cache_delete LDAP_P(( DBCache *db, Datum key )); void *ldbm_cache_sync_daemon LDAP_P(( void *)); -- 2.39.5