From: Kurt Zeilenga Date: Wed, 3 Feb 1999 17:14:01 +0000 (+0000) Subject: Use idl_fetch_one() to fetch single id_blocks instead of separate X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~649 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7903584911b38ab5df3db1aa783368460bbce76a;p=openldap Use idl_fetch_one() to fetch single id_blocks instead of separate ldbm_cache_fetch() codes. --- diff --git a/servers/slapd/back-ldbm/idl.c b/servers/slapd/back-ldbm/idl.c index 9560e1a9e8..e04c4c1674 100644 --- a/servers/slapd/back-ldbm/idl.c +++ b/servers/slapd/back-ldbm/idl.c @@ -107,19 +107,12 @@ idl_fetch( char *kstr; int i, nids; - ldbm_datum_init( data ); - - /* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch\n", 0, 0, 0 ); */ - - data = ldbm_cache_fetch( db, key ); + idl = idl_fetch_one( be, db, key ); - if ( data.dptr == NULL ) { - return( NULL ); + if ( idl == NULL ) { + return NULL; } - idl = idl_dup( (ID_BLOCK *) data.dptr ); - ldbm_datum_free( db->dbc_db, data); - if ( ID_BLOCK_ALLIDS(idl) ) { /* all ids block */ /* make sure we have the current value of highest id */