- /* snapshot the ctxcsn */
- ldap_pvt_thread_rdwr_rlock( &si->si_csn_rwlock );
- numcsns = si->si_numcsns;
- if ( numcsns ) {
- ber_bvarray_dup_x( &ctxcsn, si->si_ctxcsn, op->o_tmpmemctx );
- sids = op->o_tmpalloc( numcsns * sizeof(int), op->o_tmpmemctx );
- for ( i=0; i<numcsns; i++ )
- sids[i] = si->si_sids[i];
- } else {
- ctxcsn = NULL;
- sids = NULL;
- }
- dirty = si->si_dirty;
- ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock );
-
- /* We know nothing - do nothing */
- if ( !numcsns ) {
- rs->sr_err = LDAP_SUCCESS;
- send_ldap_result( op, rs );
- return rs->sr_err;
- }
-