}
/* check that the entry still obeys the schema */
- rc = entry_schema_check( op, e, save_attrs, get_manageDIT(op),
+ rc = entry_schema_check( op, e, save_attrs, get_relax(op), 0,
text, textbuf, textlen );
if ( rc != LDAP_SUCCESS || op->o_noop ) {
attrs_free( e->e_attrs );
&slap_pre_read_bv, preread_ctrl ) )
{
Debug( LDAP_DEBUG_TRACE,
- "<=- " LDAP_XSTRING(bdb_modify) ": pre-read failed!\n",
- 0, 0, 0 );
- goto return_results;
+ "<=- " LDAP_XSTRING(bdb_modify) ": pre-read "
+ "failed!\n", 0, 0, 0 );
+ if ( op->o_preread & SLAP_CONTROL_CRITICAL ) {
+ /* FIXME: is it correct to abort
+ * operation if control fails? */
+ goto return_results;
+ }
}
}
Debug( LDAP_DEBUG_TRACE,
"<=- " LDAP_XSTRING(bdb_modify)
": post-read failed!\n", 0, 0, 0 );
- goto return_results;
+ if ( op->o_postread & SLAP_CONTROL_CRITICAL ) {
+ /* FIXME: is it correct to abort
+ * operation if control fails? */
+ goto return_results;
+ }
}
}
attrs_free( dummy.e_attrs );
} else {
- rc = bdb_cache_modify( e, dummy.e_attrs, bdb->bi_dbenv, locker, &lock );
+ rc = bdb_cache_modify( bdb, e, dummy.e_attrs, locker, &lock );
switch( rc ) {
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
}
send_ldap_result( op, rs );
- if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp ) {
+ if( rs->sr_err == LDAP_SUCCESS && bdb->bi_txn_cp_kbyte ) {
TXN_CHECKPOINT( bdb->bi_dbenv,
bdb->bi_txn_cp_kbyte, bdb->bi_txn_cp_min, 0 );
}
bdb_unlocked_cache_return_entry_w (&bdb->bi_cache, e);
}
- if( preread_ctrl != NULL ) {
+ if( preread_ctrl != NULL && (*preread_ctrl) != NULL ) {
slap_sl_free( (*preread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *preread_ctrl, op->o_tmpmemctx );
}
- if( postread_ctrl != NULL ) {
+ if( postread_ctrl != NULL && (*postread_ctrl) != NULL ) {
slap_sl_free( (*postread_ctrl)->ldctl_value.bv_val, op->o_tmpmemctx );
slap_sl_free( *postread_ctrl, op->o_tmpmemctx );
}