{
struct slap_csn_entry *csne, *committed_csne = NULL;
BackendDB *be = op->o_bd->bd_self;
{
struct slap_csn_entry *csne, *committed_csne = NULL;
BackendDB *be = op->o_bd->bd_self;
LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) {
if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) {
csne->ce_state = SLAP_CSN_COMMIT;
LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) {
if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) {
csne->ce_state = SLAP_CSN_COMMIT;
- if ( csne->ce_state == SLAP_CSN_COMMIT ) committed_csne = csne;
- if ( csne->ce_state == SLAP_CSN_PENDING ) break;
+ if ( sid != -1 && sid == csne->ce_sid ) {
+ if ( csne->ce_state == SLAP_CSN_COMMIT ) committed_csne = csne;
+ if ( csne->ce_state == SLAP_CSN_PENDING ) break;
+ }
ber_dupbv( &pending->ce_csn, csn );
ber_bvreplace_x( &op->o_csn, &pending->ce_csn, op->o_tmpmemctx );
ber_dupbv( &pending->ce_csn, csn );
ber_bvreplace_x( &op->o_csn, &pending->ce_csn, op->o_tmpmemctx );
pending->ce_connid = op->o_connid;
pending->ce_opid = op->o_opid;
pending->ce_state = SLAP_CSN_PENDING;
pending->ce_connid = op->o_connid;
pending->ce_opid = op->o_opid;
pending->ce_state = SLAP_CSN_PENDING;