From 447b065abd01bacc190ae11f20ee62957517781a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 7 Dec 2005 09:51:12 +0000 Subject: [PATCH] rework previous commit? --- servers/slapd/overlays/syncprov.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 43307e5279..a3f657cb68 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -2323,14 +2323,16 @@ syncprov_db_open( strcpy( ctxcsnbuf, si->si_ctxcsnbuf ); } be_entry_release_rw( op, e, 0 ); - if ( !BER_BVISEMPTY( &si->si_ctxcsn ) ) { - 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 ); + if ( BER_BVISEMPTY( &si->si_ctxcsn ) ) { + si->si_ctxcsn.bv_len = sizeof( si->si_ctxcsnbuf ); + slap_get_csn( op, &si->si_ctxcsn, 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 -- 2.39.5