]> git.sur5r.net Git - openldap/commitdiff
Use idl_fetch_one() to fetch single id_blocks instead of separate
authorKurt Zeilenga <kurt@openldap.org>
Wed, 3 Feb 1999 17:14:01 +0000 (17:14 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 3 Feb 1999 17:14:01 +0000 (17:14 +0000)
ldbm_cache_fetch() codes.

servers/slapd/back-ldbm/idl.c

index 9560e1a9e8c7e4d3fc3a9b57b0680d231f43b19c..e04c4c1674e62869c986dade77534c00ebdc1206 100644 (file)
@@ -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 */