From 8c6d828a1fb4c32ce071ba1b55ad64332f8a081f Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 21 Sep 2007 09:34:31 +0000 Subject: [PATCH] More for Modification value counter --- servers/slapd/overlays/refint.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/servers/slapd/overlays/refint.c b/servers/slapd/overlays/refint.c index 6b1d3f72e6..55fae2d0e6 100644 --- a/servers/slapd/overlays/refint.c +++ b/servers/slapd/overlays/refint.c @@ -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 ); } -- 2.39.5