Commit e9115c2f authored by Jong Hyuk Choi's avatar Jong Hyuk Choi
Browse files

exchange normalized entryUUID

parent a718cb33
...@@ -64,7 +64,7 @@ slap_build_sync_state_ctrl( ...@@ -64,7 +64,7 @@ slap_build_sync_state_ctrl(
for ( a = e->e_attrs; a != NULL; a = a->a_next ) { for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
AttributeDescription *desc = a->a_desc; AttributeDescription *desc = a->a_desc;
if ( desc == slap_schema.si_ad_entryUUID ) { if ( desc == slap_schema.si_ad_entryUUID ) {
ber_dupbv( &entryuuid_bv, &a->a_vals[0] ); ber_dupbv( &entryuuid_bv, &a->a_nvals[0] );
} }
} }
......
...@@ -116,7 +116,7 @@ slap_add_session_log( ...@@ -116,7 +116,7 @@ slap_add_session_log(
slog_e = (struct slog_entry *) ch_calloc (1, sizeof( struct slog_entry )); slog_e = (struct slog_entry *) ch_calloc (1, sizeof( struct slog_entry ));
a = attr_find( e->e_attrs, slap_schema.si_ad_entryUUID ); 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_name, &e->e_name );
ber_dupbv( &slog_e->sl_csn, &op->o_sync_csn ); ber_dupbv( &slog_e->sl_csn, &op->o_sync_csn );
LDAP_STAILQ_INSERT_TAIL( &sop->o_sync_slog_list, slog_e, sl_link ); LDAP_STAILQ_INSERT_TAIL( &sop->o_sync_slog_list, slog_e, sl_link );
......
...@@ -1035,6 +1035,7 @@ syncrepl_entry( ...@@ -1035,6 +1035,7 @@ syncrepl_entry(
Backend *be = op->o_bd; Backend *be = op->o_bd;
slap_callback cb; slap_callback cb;
struct berval *syncuuid_bv = NULL; struct berval *syncuuid_bv = NULL;
struct berval syncUUID_strrep = { 0, NULL };
SlapReply rs = {REP_RESULT}; SlapReply rs = {REP_RESULT};
Filter f = {0}; Filter f = {0};
...@@ -1057,12 +1058,8 @@ syncrepl_entry( ...@@ -1057,12 +1058,8 @@ syncrepl_entry(
f.f_choice = LDAP_FILTER_EQUALITY; f.f_choice = LDAP_FILTER_EQUALITY;
f.f_ava = &ava; f.f_ava = &ava;
ava.aa_desc = slap_schema.si_ad_entryUUID; ava.aa_desc = slap_schema.si_ad_entryUUID;
rc = asserted_value_validate_normalize( slap_uuidstr_from_normalized( &syncUUID_strrep, syncUUID, op->o_tmpmemctx );
ava.aa_desc, ad_mr(ava.aa_desc, SLAP_MR_EQUALITY), ava.aa_value = *syncUUID;
SLAP_MR_EQUALITY, syncUUID, &ava.aa_value, &text, op->o_tmpmemctx );
if ( rc != LDAP_SUCCESS ) {
return rc;
}
op->ors_filter = &f; op->ors_filter = &f;
op->ors_filterstr.bv_len = (sizeof("entryUUID=")-1) + syncUUID->bv_len; op->ors_filterstr.bv_len = (sizeof("entryUUID=")-1) + syncUUID->bv_len;
...@@ -1207,8 +1204,8 @@ syncrepl_entry( ...@@ -1207,8 +1204,8 @@ syncrepl_entry(
done : done :
if ( ava.aa_value.bv_val ) { if ( syncUUID_strrep.bv_val ) {
ber_memfree_x( ava.aa_value.bv_val, op->o_tmpmemctx ); ber_memfree_x( syncUUID_strrep.bv_val, op->o_tmpmemctx );
} }
if ( si->si_syncUUID_ndn.bv_val ) { if ( si->si_syncUUID_ndn.bv_val ) {
ber_memfree_x( si->si_syncUUID_ndn.bv_val, op->o_tmpmemctx ); ber_memfree_x( si->si_syncUUID_ndn.bv_val, op->o_tmpmemctx );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment