]> git.sur5r.net Git - openldap/commitdiff
ITS#7037 fix syncrepl_add_glue for empty suffix
authorHoward Chu <hyc@openldap.org>
Fri, 30 Sep 2011 09:10:37 +0000 (02:10 -0700)
committerHoward Chu <hyc@openldap.org>
Fri, 30 Sep 2011 09:10:37 +0000 (02:10 -0700)
servers/slapd/syncrepl.c

index af10aee04398fc689e693f0cc66dc6d473d27692..3fd5489e536ca11afe296f754e9b47889ce7ab1e 100644 (file)
@@ -3499,8 +3499,8 @@ syncrepl_add_glue_ancestors(
        }
        
        if ( !BER_BVISEMPTY( &ptr ) ) {
-               dn.bv_len -= ptr.bv_len + 1;
-               dn.bv_val += ptr.bv_len + 1;
+               dn.bv_len -= ptr.bv_len + ( suffrdns != 0 );
+               dn.bv_val += ptr.bv_len + ( suffrdns != 0 );
        }
 
        /* the normalizedDNs are always the same length, no counting