From: Kurt Zeilenga Date: Tue, 20 Aug 2002 02:57:06 +0000 (+0000) Subject: More places where LOCK_ID() calls need to be checked. X-Git-Tag: NO_SLAP_OP_BLOCKS~1212 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9fc4a749dcecda7176cea4859fa8f51bbc91feff;p=openldap More places where LOCK_ID() calls need to be checked. --- diff --git a/servers/slapd/back-bdb/attribute.c b/servers/slapd/back-bdb/attribute.c index b41177b4e7..00a16b0ee0 100644 --- a/servers/slapd/back-bdb/attribute.c +++ b/servers/slapd/back-bdb/attribute.c @@ -67,10 +67,12 @@ bdb_attribute( txn = boi->boi_txn; } - if ( txn != NULL ) + if ( txn != NULL ) { locker = TXN_ID ( txn ); - else + } else { + /* XXYYZ: need to check return value */ LOCK_ID ( bdb->bi_dbenv, &locker ); + } if (target != NULL && dn_match(&target->e_nname, entry_ndn)) { /* we already have a LOCKED copy of the entry */ diff --git a/servers/slapd/back-bdb/bind.c b/servers/slapd/back-bdb/bind.c index ebd4880642..b9c44d0e94 100644 --- a/servers/slapd/back-bdb/bind.c +++ b/servers/slapd/back-bdb/bind.c @@ -49,6 +49,7 @@ bdb_bind( Debug( LDAP_DEBUG_ARGS, "==> bdb_bind: dn: %s\n", dn->bv_val, 0, 0); #endif + /* XXYYZ: need to check return value */ LOCK_ID(bdb->bi_dbenv, &locker); dn2entry_retry: diff --git a/servers/slapd/back-bdb/compare.c b/servers/slapd/back-bdb/compare.c index 25c8cf4f95..5b73810ddc 100644 --- a/servers/slapd/back-bdb/compare.c +++ b/servers/slapd/back-bdb/compare.c @@ -34,6 +34,7 @@ bdb_compare( u_int32_t locker; DB_LOCK lock; + /* XXYYZ: need to check return value */ LOCK_ID ( bdb->bi_dbenv, &locker ); dn2entry_retry: diff --git a/servers/slapd/back-bdb/group.c b/servers/slapd/back-bdb/group.c index 59a33e94b3..1d75d60202 100644 --- a/servers/slapd/back-bdb/group.c +++ b/servers/slapd/back-bdb/group.c @@ -79,10 +79,12 @@ bdb_group( txn = boi->boi_txn; } - if ( txn ) + if ( txn ) { locker = TXN_ID( txn ); - else + } else { + /* XXYYZ: need to check return value */ LOCK_ID ( bdb->bi_dbenv, &locker ); + } if (dn_match(&target->e_name, gr_ndn)) { /* we already have a LOCKED copy of the entry */ diff --git a/servers/slapd/back-bdb/referral.c b/servers/slapd/back-bdb/referral.c index 07c85df4b3..279e7a04ee 100644 --- a/servers/slapd/back-bdb/referral.c +++ b/servers/slapd/back-bdb/referral.c @@ -39,6 +39,7 @@ bdb_referrals( return rc; } + /* XXYYZ: need to check return value */ LOCK_ID ( bdb->bi_dbenv, &locker ); dn2entry_retry: diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index 3bea37794c..b596112556 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -71,6 +71,7 @@ bdb_search( manageDSAit = get_manageDSAit( op ); + /* XXYYZ: need to check return value */ LOCK_ID (bdb->bi_dbenv, &locker ); if ( nbase->bv_len == 0 ) {