- si->si_ctxcsn.bv_len = a->a_nvals[0].bv_len;
- if ( si->si_ctxcsn.bv_len >= sizeof(si->si_ctxcsnbuf ))
- si->si_ctxcsn.bv_len = sizeof(si->si_ctxcsnbuf)-1;
- strncpy( si->si_ctxcsnbuf, a->a_nvals[0].bv_val,
- si->si_ctxcsn.bv_len );
- si->si_ctxcsnbuf[si->si_ctxcsn.bv_len] = '\0';
- strcpy( ctxcsnbuf, si->si_ctxcsnbuf );
- }
- be_entry_release_rw( op, e, 0 );
- op->o_bd->bd_info = (BackendInfo *)on;
- op->o_req_dn = be->be_suffix[0];
- op->o_req_ndn = be->be_nsuffix[0];
- op->ors_scope = LDAP_SCOPE_SUBTREE;
- ldap_pvt_thread_create( &tid, 0, syncprov_db_otask, op );
- ldap_pvt_thread_join( tid, NULL );
- } else if ( SLAP_SYNC_SHADOW( op->o_bd )) {
- /* If we're also a consumer, and we didn't find the context entry,
- * then don't generate anything, wait for our provider to send it
- * to us.
- */
- goto out;
+ ber_bvarray_dup_x( &si->si_ctxcsn, a->a_vals, NULL );
+ si->si_numcsns = a->a_numvals;
+ si->si_sids = slap_parse_csn_sids( si->si_ctxcsn, a->a_numvals, NULL );
+ }
+ overlay_entry_release_ov( op, e, 0, on );
+ if ( si->si_ctxcsn ) {
+ op->o_req_dn = be->be_suffix[0];
+ op->o_req_ndn = be->be_nsuffix[0];
+ op->ors_scope = LDAP_SCOPE_SUBTREE;
+ ldap_pvt_thread_create( &tid, 0, syncprov_db_otask, op );
+ ldap_pvt_thread_join( tid, NULL );
+ }