X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fadd.c;h=314d044aab249978f40cf5c1998a4e69337ceb27;hb=0af1940f3fb59fe57b2281ef253fe1341c505c2c;hp=a5fa0769b01c7d189f0b586b0058a81d3b823776;hpb=0e6aa53cd10d62c9924d4cdc5ce44a592f81c76a;p=openldap diff --git a/servers/slapd/add.c b/servers/slapd/add.c index a5fa0769b0..314d044aab 100644 --- a/servers/slapd/add.c +++ b/servers/slapd/add.c @@ -180,6 +180,13 @@ do_add( Operation *op, SlapReply *rs ) op->o_bd = frontendDB; rc = frontendDB->be_add( op, rs ); + +#ifdef LDAP_X_TXN + if ( rc == LDAP_X_TXN_SPECIFY_OKAY ) { + /* skip cleanup */ + return rc; + } else +#endif if ( rc == 0 ) { if ( op->ora_e != NULL && op->o_private != NULL ) { BackendDB *bd = op->o_bd; @@ -281,8 +288,7 @@ fe_op_add( Operation *op, SlapReply *rs ) if ( op->o_bd->be_add ) { /* do the update here */ int repl_user = be_isupdate( op ); - if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) - { + if ( !SLAP_SINGLE_SHADOW(op->o_bd) || repl_user ) { int update = !BER_BVISEMPTY( &op->o_bd->be_update_ndn ); slap_callback cb = { NULL, slap_replog_cb, NULL, NULL }; @@ -645,9 +651,9 @@ int slap_add_opattrs( if ( SLAP_LASTMOD( op->o_bd ) ) { char *ptr; - timestamp.bv_val = timebuf; int gotcsn = 0; + timestamp.bv_val = timebuf; a = attr_find( op->ora_e->e_attrs, slap_schema.si_ad_entryCSN ); if ( a ) { gotcsn = 1;