si->si_presentlist = NULL;
LDAP_LIST_INIT( &si->si_nonpresentlist );
+ ldap_pvt_thread_mutex_init( &si->si_mutex );
rc = parse_syncrepl_line( cargv, cargc, si );
Avlnode *si_presentlist;
LDAP *si_ld;
LDAP_LIST_HEAD(np, nonpresent_entry) si_nonpresentlist;
+ ldap_pvt_thread_mutex_t si_mutex;
} syncinfo_t;
LDAP_TAILQ_HEAD( be_pcl, slap_csn_entry );
msg != NULL;
msg = ldap_next_message( si->si_ld, msg ) )
{
+ if ( slapd_shutdown ) {
+ rc = -2;
+ goto done;
+ }
switch( ldap_msgtype( msg ) ) {
case LDAP_RES_SEARCH_ENTRY:
ldap_get_entry_controls( si->si_ld, msg, &rctrls );
if ( si == NULL )
return NULL;
+ ldap_pvt_thread_mutex_lock( &si->si_mutex );
+
switch( abs( si->si_type )) {
case LDAP_SYNC_REFRESH_ONLY:
case LDAP_SYNC_REFRESH_AND_PERSIST:
break;
default:
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
ldap_unbind( si->si_ld );
si->si_ld = NULL;
}
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
}
ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex );
+ ldap_pvt_thread_mutex_unlock( &si->si_mutex );
return NULL;
}
void
syncinfo_free( syncinfo_t *sie )
{
+ ldap_pvt_thread_mutex_destroy( &sie->si_mutex );
if ( !BER_BVISNULL( &sie->si_provideruri ) ) {
ch_free( sie->si_provideruri.bv_val );
}