From 995c4c5bb389d07abe2f7cf0394693d3d47ef1d2 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 21 Jun 2010 17:26:50 +0000 Subject: [PATCH] Fix prev commit, return NULL if rewrite returns original DN --- servers/slapd/syncrepl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 2bba5fdef5..c39b14b2bf 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1577,7 +1577,9 @@ syncrepl_rewrite_dn( rc = rewrite( si->si_rewrite, SUFFIXM_CTX, dn->bv_val, &sdn->bv_val ); dn->bv_val[dn->bv_len] = nul; - if ( rc == REWRITE_REGEXEC_OK && sdn->bv_val ) + if ( sdn->bv_val == dn->bv_val ) + sdn->bv_val = NULL; + else if ( rc == REWRITE_REGEXEC_OK && sdn->bv_val ) sdn->bv_len = strlen( sdn->bv_val ); return rc; } -- 2.39.5