mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
ITS#8690 refix
Don't double-queue delete ops
This commit is contained in:
parent
221dd43399
commit
a5f3a2885c
1 changed files with 10 additions and 9 deletions
|
|
@ -1019,7 +1019,7 @@ syncprov_qstart( syncops *so )
|
|||
|
||||
/* Queue a persistent search response */
|
||||
static int
|
||||
syncprov_qresp( opcookie *opc, syncops *so, int mode )
|
||||
syncprov_qresp( opcookie *opc, syncops *so, int mode, int immed )
|
||||
{
|
||||
syncres *sr;
|
||||
resinfo *ri;
|
||||
|
|
@ -1074,7 +1074,10 @@ syncprov_qresp( opcookie *opc, syncops *so, int mode )
|
|||
ri->ri_csn.bv_val = NULL;
|
||||
}
|
||||
}
|
||||
ri->ri_list = &opc->ssres;
|
||||
if (immed)
|
||||
ri->ri_list = NULL;
|
||||
else
|
||||
ri->ri_list = &opc->ssres;
|
||||
ri->ri_e = opc->se;
|
||||
ri->ri_csn.bv_len = csn.bv_len;
|
||||
ri->ri_isref = opc->sreference;
|
||||
|
|
@ -1349,13 +1352,13 @@ syncprov_matchops( Operation *op, opcookie *opc, int saveit )
|
|||
} else {
|
||||
/* if found send UPDATE else send ADD */
|
||||
syncprov_qresp( opc, ss,
|
||||
found ? LDAP_SYNC_MODIFY : LDAP_SYNC_ADD );
|
||||
found ? LDAP_SYNC_MODIFY : LDAP_SYNC_ADD, 0 );
|
||||
}
|
||||
} else if ( !saveit && found ) {
|
||||
/* send DELETE */
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_DELETE );
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_DELETE, 0 );
|
||||
} else if ( !saveit ) {
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_NEW_COOKIE );
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_NEW_COOKIE, 0 );
|
||||
}
|
||||
if ( !saveit && found ) {
|
||||
/* Decrement s_inuse, was incremented when called
|
||||
|
|
@ -1908,7 +1911,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
|
|||
* the originating server may be configured to store
|
||||
* their csn values in different entries.
|
||||
*/
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_NEW_COOKIE );
|
||||
syncprov_qresp( opc, ss, LDAP_SYNC_NEW_COOKIE, 0 );
|
||||
}
|
||||
ldap_pvt_thread_mutex_unlock( &si->si_ops_mutex );
|
||||
}
|
||||
|
|
@ -1976,9 +1979,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
|
|||
for ( sm = opc->smatches; sm; sm=sm->sm_next ) {
|
||||
if ( sm->sm_op->s_op->o_abandon )
|
||||
continue;
|
||||
syncprov_qresp( opc, sm->sm_op, LDAP_SYNC_DELETE );
|
||||
if ( opc->ssres.s_info )
|
||||
free_resinfo( &opc->ssres );
|
||||
syncprov_qresp( opc, sm->sm_op, LDAP_SYNC_DELETE, 1 );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue