X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fdelete.c;h=e31c51bbdb79b7b263f7cd044a0207a34080c171;hb=3cdba151ad18dba10786fde4464442ddaf67b5fe;hp=8c696fa22ac83cbe77bac2b6f383e36245c2fe46;hpb=7f826af5fd925b04e993bbe23479b136d4517ef0;p=openldap diff --git a/servers/slapd/delete.c b/servers/slapd/delete.c index 8c696fa22a..e31c51bbdb 100644 --- a/servers/slapd/delete.c +++ b/servers/slapd/delete.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2006 The OpenLDAP Foundation. + * Copyright 1998-2007 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -90,6 +90,13 @@ do_delete( op->o_bd = frontendDB; rs->sr_err = frontendDB->be_delete( op, rs ); +#ifdef LDAP_X_TXN + if( rs->sr_err == LDAP_X_TXN_SPECIFY_OKAY ) { + /* skip cleanup */ + return rs->sr_err; + } +#endif + cleanup:; op->o_tmpfree( op->o_req_dn.bv_val, op->o_tmpmemctx ); op->o_tmpfree( op->o_req_ndn.bv_val, op->o_tmpmemctx ); @@ -155,10 +162,7 @@ fe_op_delete( Operation *op, SlapReply *rs ) if ( op->o_bd->be_delete ) { /* do the update here */ int repl_user = be_isupdate( op ); -#ifndef SLAPD_MULTIMASTER - if ( !SLAP_SHADOW(op->o_bd) || repl_user ) -#endif /* ! SLAPD_MULTIMASTER */ - { + if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) { struct berval org_req_dn = BER_BVNULL; struct berval org_req_ndn = BER_BVNULL; struct berval org_dn = BER_BVNULL; @@ -168,10 +172,7 @@ fe_op_delete( Operation *op, SlapReply *rs ) op->o_bd = op_be; -#ifdef SLAPD_MULTIMASTER - if ( !op->o_bd->be_update_ndn.bv_len || !repl_user ) -#endif /* SLAPD_MULTIMASTER */ - { + if ( !op->o_bd->be_update_ndn.bv_len || !repl_user ) { cb.sc_next = op->o_callback; op->o_callback = &cb; } @@ -211,7 +212,6 @@ fe_op_delete( Operation *op, SlapReply *rs ) op->o_req_ndn = org_req_ndn; op->o_delete_glue_parent = 0; -#ifndef SLAPD_MULTIMASTER } else { BerVarray defref = op->o_bd->be_update_refs ? op->o_bd->be_update_refs : default_referral; @@ -230,7 +230,6 @@ fe_op_delete( Operation *op, SlapReply *rs ) LDAP_UNWILLING_TO_PERFORM, "shadow context; no update referral" ); } -#endif /* ! SLAPD_MULTIMASTER */ } } else {