]> git.sur5r.net Git - openldap/commitdiff
More for Modification value counter
authorHoward Chu <hyc@openldap.org>
Fri, 21 Sep 2007 09:34:31 +0000 (09:34 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 21 Sep 2007 09:34:31 +0000 (09:34 +0000)
servers/slapd/overlays/refint.c

index 6b1d3f72e6d5a0bef93f32c20cbe58eee8bae5d5..55fae2d0e63a9e985e45c0808b372b2c19e90014 100644 (file)
@@ -54,6 +54,7 @@ typedef struct refint_attrs_s {
        BerVarray               old_nvals;
        BerVarray               new_vals;
        BerVarray               new_nvals;
+       int                             ra_numvals;
 } refint_attrs;
 
 typedef struct dependents_s {
@@ -423,6 +424,7 @@ refint_search_cb(
                                                        ber_bvarray_add_x( &na->old_vals, &olddn, op->o_tmpmemctx );
                                                        ber_dupbv_x( &oldndn, &a->a_nvals[first], op->o_tmpmemctx );
                                                        ber_bvarray_add_x( &na->old_nvals, &oldndn, op->o_tmpmemctx );
+                                                       na->ra_numvals++;
 
                                                        newsub = a->a_vals[first];
                                                        newsub.bv_len -= rq->olddn.bv_len + 1;
@@ -445,6 +447,7 @@ refint_search_cb(
                                                ber_bvarray_add_x( &na->old_vals, &olddn, op->o_tmpmemctx );
                                                ber_dupbv_x( &oldndn, &a->a_nvals[i], op->o_tmpmemctx );
                                                ber_bvarray_add_x( &na->old_nvals, &oldndn, op->o_tmpmemctx );
+                                               na->ra_numvals++;
 
                                                newsub = a->a_vals[i];
                                                newsub.bv_len -= rq->olddn.bv_len + 1;
@@ -687,6 +690,7 @@ refint_qtask( void *ctx, void *arg )
                                        } else {
                                                m->sml_values = ra->new_vals;
                                                m->sml_nvalues = ra->new_nvals;
+                                               m->sml_numvals = ra->ra_numvals;
                                        }
                                }
 
@@ -705,6 +709,7 @@ refint_qtask( void *ctx, void *arg )
                                m->sml_desc = ra->attr;
                                m->sml_type = ra->attr->ad_cname;
                                if ( ra->old_vals == NULL ) {
+                                       m->sml_numvals = 1;
                                        m->sml_values = (BerVarray)(m+1);
                                        m->sml_nvalues = m->sml_values+2;
                                        m->sml_values[0] = rq->olddn;
@@ -714,6 +719,7 @@ refint_qtask( void *ctx, void *arg )
                                } else {
                                        m->sml_values = ra->old_vals;
                                        m->sml_nvalues = ra->old_nvals;
+                                       m->sml_numvals = ra->ra_numvals;
                                }
                                op->o_tmpfree( ra, op->o_tmpmemctx );
                        }