X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fsyncrepl.c;fp=servers%2Fslapd%2Fsyncrepl.c;h=1788ca08387a4235713386104d2364bbb0ca56f1;hb=480f0c16ff458c0884689b4ff833241c2ae73534;hp=e69959fd168b4625aae057b86784e476046c2fd4;hpb=67bbad6e704840fecdacdc45ce536719dd5173f2;p=openldap diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index e69959fd16..1788ca0838 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -2010,8 +2010,13 @@ syncrepl_op_modify( Operation *op, SlapReply *rs ) overlay_entry_release_ov( op, e, 0, on ); } /* mod is newer, let it go */ - if ( match > 0 ) + if ( match > 0 ) { + for ( mod = op->orm_modlist; mod; mod=mod->sml_next ) { + if ( mod->sml_op == LDAP_MOD_DELETE ) + mod->sml_op = SLAP_MOD_SOFTDEL; + } return SLAP_CB_CONTINUE; + } /* equal? Should never happen */ if ( match == 0 ) return LDAP_SUCCESS; @@ -2067,15 +2072,13 @@ syncrepl_op_modify( Operation *op, SlapReply *rs ) op2.ors_attrsonly = 0; bv = mod->sml_nvalues[0]; - ptr = strchr(bv.bv_val, '.'); - bv.bv_len = ptr - bv.bv_val; - size = sizeof("(&(reqStart>=)(reqDN=))"); + size = sizeof("(&(entryCSN>=)(reqDN=))"); size += bv.bv_len + op->o_req_ndn.bv_len + si->si_logfilterstr.bv_len; op2.ors_filterstr.bv_val = op->o_tmpalloc( size, op->o_tmpmemctx ); op2.ors_filterstr.bv_len = sprintf(op2.ors_filterstr.bv_val, - "(&(reqStart>=%.*s)(reqDN=%s)%s)", - (int)bv.bv_len, bv.bv_val, op->o_req_ndn.bv_val, si->si_logfilterstr.bv_val ); + "(&(entryCSN>=%s)(reqDN=%s)%s)", + bv.bv_val, op->o_req_ndn.bv_val, si->si_logfilterstr.bv_val ); op2.ors_filter = str2filter_x( op, op2.ors_filterstr.bv_val ); op2.o_callback = &cb; @@ -2106,6 +2109,7 @@ syncrepl_op_modify( Operation *op, SlapReply *rs ) } } op->orm_modlist = newlist; + op->o_csn = mod->sml_nvalues[0]; } return SLAP_CB_CONTINUE; }