mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
ITS#3559 fix hdb dn2idl idl_cache usage
This commit is contained in:
parent
4295f398af
commit
2b725a3dfe
@ -825,6 +825,16 @@ hdb_dn2idl_internal(
|
|||||||
struct dn2id_cookie *cx
|
struct dn2id_cookie *cx
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
BDB_IDL_ZERO( cx->tmp );
|
||||||
|
|
||||||
|
if ( !cx->ei ) {
|
||||||
|
cx->ei = bdb_cache_find_info( cx->bdb, cx->id );
|
||||||
|
if ( !cx->ei ) {
|
||||||
|
cx->rc = DB_NOTFOUND;
|
||||||
|
goto saveit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( cx->bdb->bi_idl_cache_size ) {
|
if ( cx->bdb->bi_idl_cache_size ) {
|
||||||
cx->key.data = &cx->id;
|
cx->key.data = &cx->id;
|
||||||
cx->rc = bdb_idl_cache_get(cx->bdb, cx->db, &cx->key, cx->tmp);
|
cx->rc = bdb_idl_cache_get(cx->bdb, cx->db, &cx->key, cx->tmp);
|
||||||
@ -835,15 +845,6 @@ hdb_dn2idl_internal(
|
|||||||
goto gotit;
|
goto gotit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BDB_IDL_ZERO( cx->tmp );
|
|
||||||
|
|
||||||
if ( !cx->ei ) {
|
|
||||||
cx->ei = bdb_cache_find_info( cx->bdb, cx->id );
|
|
||||||
if ( !cx->ei ) {
|
|
||||||
cx->rc = DB_NOTFOUND;
|
|
||||||
goto saveit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bdb_cache_entryinfo_lock( cx->ei );
|
bdb_cache_entryinfo_lock( cx->ei );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user