if ( txn != NULL ) {
locker = TXN_ID ( txn );
} else {
- /* XXYYZ: need to check return value */
- LOCK_ID ( bdb->bi_dbenv, &locker );
+ rc = LOCK_ID ( bdb->bi_dbenv, &locker );
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ return LDAP_OTHER;
+ }
}
if (target != NULL && dn_match(&target->e_nname, entry_ndn)) {
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);
+ rc = LOCK_ID(bdb->bi_dbenv, &locker);
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ send_ldap_result( conn, op, rc=LDAP_OTHER,
+ NULL, "internal error", NULL, NULL );
+ return rc;
+ }
dn2entry_retry:
/* get entry */
u_int32_t locker;
DB_LOCK lock;
- /* XXYYZ: need to check return value */
- LOCK_ID ( bdb->bi_dbenv, &locker );
+ rc = LOCK_ID(bdb->bi_dbenv, &locker);
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ send_ldap_result( conn, op, rc=LDAP_OTHER,
+ NULL, "internal error", NULL, NULL );
+ return rc;
+ }
dn2entry_retry:
/* get entry */
if ( txn ) {
locker = TXN_ID( txn );
} else {
- /* XXYYZ: need to check return value */
LOCK_ID ( bdb->bi_dbenv, &locker );
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ return 1;
+ }
}
if (dn_match(&target->e_name, gr_ndn)) {
return rc;
}
- /* XXYYZ: need to check return value */
- LOCK_ID ( bdb->bi_dbenv, &locker );
+ rc = LOCK_ID(bdb->bi_dbenv, &locker);
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ return LDAP_OTHER;
+ }
dn2entry_retry:
/* get entry */
manageDSAit = get_manageDSAit( op );
- /* XXYYZ: need to check return value */
- LOCK_ID (bdb->bi_dbenv, &locker );
+ rc = LOCK_ID (bdb->bi_dbenv, &locker );
+ switch(rc) {
+ case 0:
+ break;
+ default:
+ send_ldap_result( conn, op, rc=LDAP_OTHER,
+ NULL, "internal error", NULL, NULL );
+ return rc;
+ }
if ( nbase->bv_len == 0 ) {
/* DIT root special case */