X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fctxcsn.c;h=6d29007b58ef542dedff258f4a381626f4540633;hb=5631f25839a4a83521993639a96909267ea7bce6;hp=defcac2e89dec319756c4d99f707dc9e1b4b078c;hpb=dc0eacd40b625258355eea866d62188e5aa7ce3b;p=openldap diff --git a/servers/slapd/ctxcsn.c b/servers/slapd/ctxcsn.c index defcac2e89..6d29007b58 100644 --- a/servers/slapd/ctxcsn.c +++ b/servers/slapd/ctxcsn.c @@ -37,7 +37,6 @@ slap_get_commit_csn( ) { struct slap_csn_entry *csne, *committed_csne = NULL; - int i = 0; if ( maxcsn ) { BER_BVZERO( maxcsn ); @@ -125,7 +124,6 @@ slap_create_context_csn_entry( struct berval *context_csn ) { Entry* e; - int rc; struct berval bv; @@ -183,7 +181,13 @@ slap_get_csn( { if ( csn == NULL ) return LDAP_OTHER; +#ifndef HAVE_GMTIME_R + ldap_pvt_thread_mutex_lock( &gmtime_mutex ); +#endif csn->bv_len = lutil_csnstr( csnbuf, len, 0, 0 ); +#ifndef HAVE_GMTIME_R + ldap_pvt_thread_mutex_unlock( &gmtime_mutex ); +#endif csn->bv_val = csnbuf; if ( manage_ctxcsn )