From: Howard Chu Date: Fri, 21 Mar 2008 00:09:24 +0000 (+0000) Subject: ITS#5432 don't send cookie with delete set if there's no true delete CSN X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~60 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fc69e61be68be1d6d34a3ee19eb6fb41848cc104;p=openldap ITS#5432 don't send cookie with delete set if there's no true delete CSN --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 0bc2d38063..74d841b8bf 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1555,13 +1555,16 @@ syncprov_playlog( Operation *op, SlapReply *rs, sessionlog *sl, if ( ndel ) { struct berval cookie; - slap_compose_sync_cookie( op, &cookie, delcsn, srs->sr_state.rid, - srs->sr_state.sid ); + if ( delcsn[0].bv_len ) { + slap_compose_sync_cookie( op, &cookie, delcsn, srs->sr_state.rid, + srs->sr_state.sid ); + } Debug( LDAP_DEBUG_SYNC, "syncprov_playlog: cookie=%s\n", cookie.bv_val, 0, 0 ); uuids[ndel].bv_val = NULL; - syncprov_sendinfo( op, rs, LDAP_TAG_SYNC_ID_SET, &cookie, 0, uuids, 1 ); + syncprov_sendinfo( op, rs, LDAP_TAG_SYNC_ID_SET, + delcsn[0].bv_len ? &cookie : NULL, 0, uuids, 1 ); op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); } op->o_tmpfree( uuids, op->o_tmpmemctx );