From: Quanah Gibson-Mount Date: Fri, 5 Dec 2008 18:29:09 +0000 (+0000) Subject: More for ITS#5809 X-Git-Tag: OPENLDAP_REL_ENG_2_4_14~141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e0f640fb08089a6e3bdb6d770392e49c3fd328d8;p=openldap More for ITS#5809 --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 865bdcdbd3..1f17946e48 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2207,7 +2207,7 @@ retry_add:; if ( dni.renamed ) { struct berval noldp, newp; Modifications *mod, **modtail, **ml, *m2; - int i, got_replace = 0; + int i, got_replace = 0, just_rename = 0; op->o_tag = LDAP_REQ_MODRDN; dnRdn( &entry->e_name, &op->orr_newrdn ); @@ -2367,8 +2367,12 @@ retry_add:; */ if ( dni.mods ) { mod = dni.mods; + /* don't set a CSN for the rename op */ + if ( syncCSN ) + slap_graduate_commit_csn( op ); } else { mod = op->orr_modlist; + just_rename = 1; } for ( ; mod->sml_next; mod=mod->sml_next ); mod->sml_next = m2; @@ -2386,6 +2390,9 @@ retry_add:; /* Renamed entries may still have other mods so just fallthru */ op->o_req_dn = entry->e_name; op->o_req_ndn = entry->e_nname; + /* Use CSN on the modify */ + if ( syncCSN && !just_rename ) + slap_queue_csn( op, syncCSN ); } if ( dni.mods ) { op->o_tag = LDAP_REQ_MODIFY;