]> git.sur5r.net Git - openldap/commitdiff
Fix prev commit, update kid counters too
authorHoward Chu <hyc@openldap.org>
Wed, 19 Jul 2006 00:06:57 +0000 (00:06 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 19 Jul 2006 00:06:57 +0000 (00:06 +0000)
servers/slapd/back-bdb/cache.c

index d82536dd2264be7ef8cd98357e31539b0dedad6d..ae7ef6c0ea61fa78b4aadb688fbd656d526ba387 100644 (file)
@@ -1030,6 +1030,8 @@ bdb_cache_modrdn(
                rdn.bv_len = ptr - rdn.bv_val;
        }
        ber_dupbv( &ei->bei_rdn, &rdn );
+       pei->bei_ckids--;
+       if ( pei->bei_dkids ) pei->bei_dkids--;
 #endif
 
        if (!ein) {
@@ -1056,6 +1058,8 @@ bdb_cache_modrdn(
                ei->bei_modrdns = bdb->bi_modrdns;
                ldap_pvt_thread_mutex_unlock( &bdb->bi_modrdns_mutex );
        }
+       ein->bei_ckids++;
+       if ( ein->bei_dkids ) ein->bei_dkids++;
 #endif
        avl_insert( &ein->bei_kids, ei, bdb_rdn_cmp, avl_dup_error );
        bdb_cache_entryinfo_unlock( ein );