]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit
authorHoward Chu <hyc@openldap.org>
Thu, 1 May 2008 13:25:15 +0000 (13:25 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 1 May 2008 13:25:15 +0000 (13:25 +0000)
servers/slapd/back-bdb/add.c
servers/slapd/back-bdb/cache.c
servers/slapd/back-bdb/delete.c
servers/slapd/back-bdb/id2entry.c
servers/slapd/back-bdb/modify.c
servers/slapd/back-bdb/modrdn.c
servers/slapd/back-bdb/search.c

index 34057569701ce8ae88e272f77857858546ab45cc..36acb47696b76f5e770dc09d2d5d67ed4676dad2 100644 (file)
@@ -159,7 +159,7 @@ retry:      /* transaction retry */
 
        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;
index edf73ab28ca7d69416d446db99df3fa718a28552..83512525872f1ff7cb70e98e8baba2aadf472205 100644 (file)
@@ -174,6 +174,8 @@ bdb_cache_entry_db_relock(
 
        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;
 
@@ -210,6 +212,8 @@ bdb_cache_entry_db_lock( struct bdb_info *bdb, BDB_LOCKER locker, EntryInfo *ei,
 
        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
@@ -239,6 +243,8 @@ bdb_cache_entry_db_unlock ( struct bdb_info *bdb, DB_LOCK *lock )
 
        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
index 00b3a9409a467c584b8e2422a660009b7d2e6a1a..6f0207f6e616ab2873e3e2a694f35886c6982300 100644 (file)
@@ -156,7 +156,7 @@ retry:      /* transaction retry */
 
        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;
index 5059e06270449355710e0f874bd54ef187a4b186..15da6c76594732a4529d224aea5afc529d75f8d1 100644 (file)
@@ -259,7 +259,7 @@ int bdb_entry_release(
                }
                /* 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;
 
@@ -335,7 +335,7 @@ int bdb_entry_get(
        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 )
@@ -416,7 +416,7 @@ return_results:
                        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 ) {
index 9fdb85d4def5bc51ce7db920eec75d606711cb79..67d04d95f3c4e6cbd14485636b95c7ae2333ae58 100644 (file)
@@ -440,7 +440,7 @@ retry:      /* transaction retry */
 
        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;
index 6b31e416b5fdb337fe66e0746816bcb9f08aad31..fbe9f2ea20f2c9f2dc01022490ae381c44afd3aa 100644 (file)
@@ -166,7 +166,7 @@ retry:      /* transaction retry */
 
        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;
index fe4890b77bf08cb326602540bed155dfee7fe787..448316516fee90db5cf019023df8aca24c47780e 100644 (file)
@@ -328,7 +328,7 @@ bdb_search( Operation *op, SlapReply *rs )
        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;