From: Jong Hyuk Choi Date: Wed, 19 Nov 2003 07:28:42 +0000 (+0000) Subject: exchange normalized entryUUID X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~430 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e9115c2f095c8f800a73fdf3852e0b4dd7fa83ef;p=openldap exchange normalized entryUUID --- diff --git a/servers/slapd/ldapsync.c b/servers/slapd/ldapsync.c index fd33731a0f..9be438a13e 100644 --- a/servers/slapd/ldapsync.c +++ b/servers/slapd/ldapsync.c @@ -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] ); } } diff --git a/servers/slapd/sessionlog.c b/servers/slapd/sessionlog.c index cb759ee725..30d52a09f1 100644 --- a/servers/slapd/sessionlog.c +++ b/servers/slapd/sessionlog.c @@ -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 ); diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 22b8d11a22..abeed6ca53 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -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 );