From: Howard Chu Date: Mon, 21 Jun 2010 17:26:50 +0000 (+0000) Subject: Fix prev commit, return NULL if rewrite returns original DN X-Git-Tag: MIGRATION_CVS2GIT~572 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=995c4c5bb389d07abe2f7cf0394693d3d47ef1d2;p=openldap Fix prev commit, return NULL if rewrite returns original DN --- 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; }