X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-bdb%2Fdn2id.c;h=64231082728892978f1ab39b0e5dfe2c6651b834;hb=0af1940f3fb59fe57b2281ef253fe1341c505c2c;hp=311fb30f1934b80041f743b288d1b3ee03671695;hpb=2b9c8076ccd381b703e618deb506e8caf89f9aa7;p=openldap diff --git a/servers/slapd/back-bdb/dn2id.c b/servers/slapd/back-bdb/dn2id.c index 311fb30f19..6423108272 100644 --- a/servers/slapd/back-bdb/dn2id.c +++ b/servers/slapd/back-bdb/dn2id.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2005 The OpenLDAP Foundation. + * Copyright 2000-2006 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -178,7 +178,7 @@ bdb_dn2id_delete( #endif { buf[0] = DN_SUBTREE_PREFIX; - rc = db->del( db, txn, &key, 0 ); + rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id ); if( rc != 0 ) { Debug( LDAP_DEBUG_ANY, "=> bdb_dn2id_delete: subtree (%s) delete failed: %d\n", @@ -1006,7 +1006,7 @@ synced: if ( !BDB_IDL_IS_RANGE( cx->tmp ) && cx->tmp[0] > 3 ) bdb_idl_sort( cx->tmp, cx->buf ); - if ( cx->bdb->bi_idl_cache_max_size ) { + if ( cx->bdb->bi_idl_cache_max_size && !BDB_IDL_IS_ZERO( cx->tmp )) { char *ptr = ((char *)&cx->id)-1; cx->key.data = ptr; cx->key.size = sizeof(ID)+1;