mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Use idl_fetch_one() to fetch single id_blocks instead of separate
ldbm_cache_fetch() codes.
This commit is contained in:
parent
e552c315f4
commit
7903584911
@ -107,19 +107,12 @@ idl_fetch(
|
||||
char *kstr;
|
||||
int i, nids;
|
||||
|
||||
ldbm_datum_init( data );
|
||||
idl = idl_fetch_one( be, db, key );
|
||||
|
||||
/* Debug( LDAP_DEBUG_TRACE, "=> idl_fetch\n", 0, 0, 0 ); */
|
||||
|
||||
data = ldbm_cache_fetch( 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 */
|
||||
|
Loading…
Reference in New Issue
Block a user