From: Howard Chu Date: Fri, 11 Apr 2008 12:12:06 +0000 (+0000) Subject: ITS#5454 regular mutex lock is safe X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61b5f6d6524afe4c2952359ba6c94f76abe05e12;p=openldap ITS#5454 regular mutex lock is safe --- diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 93ff10fc9b..161ff46b14 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1174,9 +1174,8 @@ do_syncrepl( if ( si == NULL ) return NULL; - /* Don't wait around if there's a previous session still running */ - if ( ldap_pvt_thread_mutex_trylock( &si->si_mutex )) - return NULL; + /* There will never be more than one instance active */ + ldap_pvt_thread_mutex_lock( &si->si_mutex ); switch( abs( si->si_type ) ) { case LDAP_SYNC_REFRESH_ONLY: