locker = TXN_ID ( ltid );
- opinfo.boi_oe.oe_key = op->o_bd->bd_self;
+ opinfo.boi_oe.oe_key = bdb;
opinfo.boi_txn = ltid;
opinfo.boi_err = 0;
opinfo.boi_acl_cache = op->o_do_not_cache;
if ( !lock ) return 0;
+Debug( LDAP_DEBUG_TRACE, "bdb_cache_entry_dn_relock: lock %p locker %d\n", lock,locker,0 );
+
lockobj.data = &ei->bei_id;
lockobj.size = sizeof(ei->bei_id) + 1;
if ( !lock ) return 0;
+Debug( LDAP_DEBUG_TRACE, "bdb_cache_entry_db_lock: lock %p locker %d\n", lock,locker,0 );
+
if (rw)
db_rw = DB_LOCK_WRITE;
else
if ( !lock || lock->mode == DB_LOCK_NG ) return 0;
+Debug( LDAP_DEBUG_TRACE, "bdb_cache_entry_db_unlock: lock %p\n", lock,0,0 );
+
rc = LOCK_PUT ( bdb->bi_dbenv, lock );
return rc;
#endif
locker = TXN_ID ( ltid );
- opinfo.boi_oe.oe_key = op->o_bd->bd_self;
+ opinfo.boi_oe.oe_key = bdb;
opinfo.boi_txn = ltid;
opinfo.boi_err = 0;
opinfo.boi_acl_cache = op->o_do_not_cache;
}
/* free entry and reader or writer lock */
LDAP_SLIST_FOREACH( oex, &op->o_extra, oe_next ) {
- if ( oex->oe_key == op->o_bd->bd_self ) break;
+ if ( oex->oe_key == bdb ) break;
}
boi = (struct bdb_op_info *)oex;
if( op ) {
OpExtra *oex;
LDAP_SLIST_FOREACH( oex, &op->o_extra, oe_next ) {
- if ( oex->oe_key == op->o_bd->bd_self ) break;
+ if ( oex->oe_key == bdb ) break;
}
boi = (struct bdb_op_info *)oex;
if ( boi )
if ( op ) {
if ( !boi ) {
boi = op->o_tmpcalloc(1,sizeof(struct bdb_op_info),op->o_tmpmemctx);
- boi->boi_oe.oe_key = op->o_bd;
+ boi->boi_oe.oe_key = bdb;
LDAP_SLIST_INSERT_HEAD( &op->o_extra, &boi->boi_oe, oe_next );
}
if ( !boi->boi_txn ) {
locker = TXN_ID ( ltid );
- opinfo.boi_oe.oe_key = op->o_bd->bd_self;
+ opinfo.boi_oe.oe_key = bdb;
opinfo.boi_txn = ltid;
opinfo.boi_err = 0;
opinfo.boi_acl_cache = op->o_do_not_cache;
locker = TXN_ID ( ltid );
- opinfo.boi_oe.oe_key = op->o_bd->bd_self;
+ opinfo.boi_oe.oe_key = bdb;
opinfo.boi_txn = ltid;
opinfo.boi_err = 0;
opinfo.boi_acl_cache = op->o_do_not_cache;
attrs = op->oq_search.rs_attrs;
LDAP_SLIST_FOREACH( oex, &op->o_extra, oe_next ) {
- if ( oex->oe_key == (void *)op->o_bd->bd_self )
+ if ( oex->oe_key == bdb )
break;
}
opinfo = (struct bdb_op_info *) oex;