text, 0, 0 );
} else {
rc = op->o_bd->be_add( op, &rs );
+ Debug( LDAP_DEBUG_SYNC,
+ "syncrepl_message_to_op: be_add %s (%d)\n",
+ op->o_req_dn.bv_val, rc, 0 );
}
be_entry_release_w( op, op->ora_e );
} else {
op->orm_modlist = modlist;
rc = op->o_bd->be_modify( op, &rs );
+ Debug( LDAP_DEBUG_SYNC,
+ "syncrepl_message_to_op: be_modify %s (%d)\n",
+ op->o_req_dn.bv_val, rc, 0 );
}
break;
case LDAP_REQ_MODRDN:
goto done;
rc = op->o_bd->be_modrdn( op, &rs );
slap_mods_free( op->orr_modlist, 1 );
+ Debug( LDAP_DEBUG_SYNC,
+ "syncrepl_message_to_op: be_modrdn %s (%d)\n",
+ op->o_req_dn.bv_val, rc, 0 );
break;
case LDAP_REQ_DELETE:
rc = op->o_bd->be_delete( op, &rs );
+ Debug( LDAP_DEBUG_SYNC,
+ "syncrepl_message_to_op: be_delete %s (%d)\n",
+ op->o_req_dn.bv_val, rc, 0 );
break;
}
done:
dnParent( &dni.ndn, &noldp );
dnParent( &entry->e_nname, &nnewp );
- if ( !dn_match( &noldp, &newp )) {
+ if ( !dn_match( &noldp, &nnewp )) {
dnParent( &entry->e_name, &newp );
op->orr_newSup = &newp;
op->orr_nnewSup = &nnewp;
for (i=0; uuids[i].bv_val; i++) {
op->ors_slimit = 1;
+ slap_uuidstr_from_normalized( &uf.f_av_value, &uuids[i],
+ op->o_tmpmemctx );
+ filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
uf.f_av_value = uuids[i];
rc = be->be_search( op, &rs_search );
+ op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
}
si->si_refreshDelete ^= NP_DELETE_ONE;
} else {
op->o_req_dn = *np_prev->npe_name;
op->o_req_ndn = *np_prev->npe_nname;
rc = op->o_bd->be_delete( op, &rs_delete );
+ Debug( LDAP_DEBUG_SYNC,
+ "syncrepl_del_nonpresent: be_delete %s (%d)\n",
+ op->o_req_dn.bv_val, rc, 0 );
if ( rs_delete.sr_err == LDAP_NOT_ALLOWED_ON_NONLEAF ) {
Modifications mod1, mod2;
void
syncinfo_free( syncinfo_t *sie )
{
+ if ( sie->si_ld ) {
+ if ( sie->si_conn_setup ) {
+ ber_socket_t s;
+ ldap_get_option( sie->si_ld, LDAP_OPT_DESC, &s );
+ connection_client_stop( s );
+ sie->si_conn_setup = 0;
+ }
+ ldap_unbind_ext( sie->si_ld, NULL, NULL );
+ }
+
/* re-fetch it, in case it was already removed */
sie->si_re = ldap_pvt_runqueue_find( &slapd_rq, do_syncrepl, sie );
if ( sie->si_re ) {
if ( sie->si_presentlist ) {
avl_free( sie->si_presentlist, avl_ber_bvfree );
}
- if ( sie->si_ld ) {
- ldap_unbind_ext( sie->si_ld, NULL, NULL );
- }
while ( !LDAP_LIST_EMPTY( &sie->si_nonpresentlist )) {
struct nonpresent_entry* npe;
npe = LDAP_LIST_FIRST( &sie->si_nonpresentlist );