]> git.sur5r.net Git - openldap/commitdiff
first round of CSN normalization consequences
authorPierangelo Masarati <ando@openldap.org>
Tue, 28 Aug 2007 18:38:27 +0000 (18:38 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 28 Aug 2007 18:38:27 +0000 (18:38 +0000)
servers/slapd/overlays/accesslog.c
servers/slapd/syncrepl.c

index 6ee3380cb71bcf236269382e4b7988f0ef558138..51813e6a8c95f7ccef1bc2c190d8b3c443d0df1d 100644 (file)
@@ -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 );
                }
index d0893a31446f6348e8ec647e372e6467d4e5076a..f4ff79c6ec3ec729204048e738cbb5f1fc6de073 100644 (file)
@@ -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;
                }