DB_TXN *ltid = NULL;
struct bdb_op_info opinfo;
- Debug(LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n", dn, 0, 0);
+ Debug( LDAP_DEBUG_ARGS, "==> bdb_delete: %s\n", dn, 0, 0 );
if (0) {
- /* transaction retry */
-retry: rc = txn_abort( ltid );
+retry: /* transaction retry */
+ Debug( LDAP_DEBUG_TRACE, "==> bdb_delete: retrying...\n", 0, 0, 0 );
+ rc = txn_abort( ltid );
ltid = NULL;
op->o_private = NULL;
if( rc != 0 ) {
rc = db->get( db, txn, &key, &data, 0 );
Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id: id=0x%08lx: %s (%d)\n",
- id, db_strerror( rc ), rc );
+ *id, db_strerror( rc ), rc );
ch_free( key.data );
return rc;
rc = db->get( db, txn, &key, &data, 0 );
- Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %s (%d)\n",
+ Debug( LDAP_DEBUG_TRACE, "<= bdb_dn2id_children( %s ): %schildren (%d)\n",
dn,
- rc == 0 ? "yes" : ( rc == DB_NOTFOUND ? "no" :
+ rc == 0 ? "" : ( rc == DB_NOTFOUND ? "no " :
db_strerror(rc) ), rc );
return rc;
if( x <= 0 ) {
/* internal error */
- return -1;
+ return -2;
}
if( x > ids[0] || ids[x] != id ) {
} else if ( --ids[0] == 0 ) {
if( x != 1 ) {
- return -1;
+ return -3;
}
} else {
if( rc != 0 ) {
Debug( LDAP_DEBUG_ANY,
- "=> bdb_idl_insert_key: idl_insert failed (%d)\n",
+ "=> bdb_idl_delete_key: idl_delete failed (%d)\n",
rc, 0, 0 );
return rc;
}