]> git.sur5r.net Git - openldap/commitdiff
exchange normalized entryUUID
authorJong Hyuk Choi <jongchoi@openldap.org>
Wed, 19 Nov 2003 07:28:42 +0000 (07:28 +0000)
committerJong Hyuk Choi <jongchoi@openldap.org>
Wed, 19 Nov 2003 07:28:42 +0000 (07:28 +0000)
servers/slapd/ldapsync.c
servers/slapd/sessionlog.c
servers/slapd/syncrepl.c

index fd33731a0fa9ff494ee0dfad9bbfd5c1d1402f2c..9be438a13eda470872cefdf897e9bd1101ea4e90 100644 (file)
@@ -64,7 +64,7 @@ slap_build_sync_state_ctrl(
        for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
                AttributeDescription *desc = a->a_desc;
                if ( desc == slap_schema.si_ad_entryUUID ) {
-                       ber_dupbv( &entryuuid_bv, &a->a_vals[0] );
+                       ber_dupbv( &entryuuid_bv, &a->a_nvals[0] );
                }
        }
 
index cb759ee7251439316ae0b958e416f1eddb88f46a..30d52a09f119b369ec8e977d1e16283af3d01082 100644 (file)
@@ -116,7 +116,7 @@ slap_add_session_log(
 
        slog_e = (struct slog_entry *) ch_calloc (1, sizeof( struct slog_entry ));
        a = attr_find( e->e_attrs, slap_schema.si_ad_entryUUID );
-       ber_dupbv( &slog_e->sl_uuid, &a->a_vals[0] );
+       ber_dupbv( &slog_e->sl_uuid, &a->a_nvals[0] );
        ber_dupbv( &slog_e->sl_name, &e->e_name );
        ber_dupbv( &slog_e->sl_csn,  &op->o_sync_csn );
        LDAP_STAILQ_INSERT_TAIL( &sop->o_sync_slog_list, slog_e, sl_link );
index 22b8d11a22cc62d269ec5156b82d6067317712ff..abeed6ca538f88a5e49eaf5e8212aae9a0710722 100644 (file)
@@ -1035,6 +1035,7 @@ syncrepl_entry(
        Backend *be = op->o_bd;
        slap_callback   cb;
        struct berval   *syncuuid_bv = NULL;
+       struct berval   syncUUID_strrep = { 0, NULL };
 
        SlapReply       rs = {REP_RESULT};
        Filter f = {0};
@@ -1057,12 +1058,8 @@ syncrepl_entry(
        f.f_choice = LDAP_FILTER_EQUALITY;
        f.f_ava = &ava;
        ava.aa_desc = slap_schema.si_ad_entryUUID;
-       rc = asserted_value_validate_normalize(
-               ava.aa_desc, ad_mr(ava.aa_desc, SLAP_MR_EQUALITY),
-               SLAP_MR_EQUALITY, syncUUID, &ava.aa_value, &text, op->o_tmpmemctx );
-       if ( rc != LDAP_SUCCESS ) {
-               return rc;
-       }
+       slap_uuidstr_from_normalized( &syncUUID_strrep, syncUUID, op->o_tmpmemctx );
+       ava.aa_value = *syncUUID;
        op->ors_filter = &f;
 
        op->ors_filterstr.bv_len = (sizeof("entryUUID=")-1) + syncUUID->bv_len;
@@ -1207,8 +1204,8 @@ syncrepl_entry(
 
 done :
 
-       if ( ava.aa_value.bv_val ) {
-               ber_memfree_x( ava.aa_value.bv_val, op->o_tmpmemctx );
+       if ( syncUUID_strrep.bv_val ) {
+               ber_memfree_x( syncUUID_strrep.bv_val, op->o_tmpmemctx );
        }
        if ( si->si_syncUUID_ndn.bv_val ) {
                ber_memfree_x( si->si_syncUUID_ndn.bv_val, op->o_tmpmemctx );