From 5ed5bc580318ab779fdd0723f30857ac3314e4b9 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 28 Aug 2007 18:38:27 +0000 Subject: [PATCH] first round of CSN normalization consequences --- servers/slapd/overlays/accesslog.c | 7 +++++-- servers/slapd/syncrepl.c | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 6ee3380cb7..51813e6a8c 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -1906,8 +1906,11 @@ accesslog_db_root( a = attr_find( e_ctx->e_attrs, slap_schema.si_ad_contextCSN ); if ( a ) { - attr_merge( e, slap_schema.si_ad_entryCSN, a->a_vals, NULL ); - attr_merge( e, a->a_desc, a->a_vals, NULL ); + /* FIXME: contextCSN could have multiple values! + * should select the one with the server's SID */ + attr_merge_one( e, slap_schema.si_ad_entryCSN, + &a->a_vals[0], &a->a_nvals[0] ); + attr_merge( e, a->a_desc, a->a_vals, a->a_nvals ); } be_entry_release_rw( op, e_ctx, 0 ); } diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index d0893a3144..f4ff79c6ec 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1709,6 +1709,7 @@ syncrepl_message_to_entry( */ if ( is_ctx && !strcasecmp( tmp.sml_type.bv_val, slap_schema.si_ad_contextCSN->ad_cname.bv_val )) { + if ( tmp.sml_nvalues ) ber_bvarray_free( tmp.sml_nvalues ); ber_bvarray_free( tmp.sml_values ); continue; } -- 2.39.5