X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fctxcsn.c;h=408ee66838d796f916e667aff634b37718e6147f;hb=a4d2c63a61fca123d7f54aa84c79ba4b496242a9;hp=3e99830e3ceb1e949545e4541f4eee44dbd4800b;hpb=bd166fbcb8c4dda5e98698dfa2486377541a3670;p=openldap diff --git a/servers/slapd/ctxcsn.c b/servers/slapd/ctxcsn.c index 3e99830e3c..408ee66838 100644 --- a/servers/slapd/ctxcsn.c +++ b/servers/slapd/ctxcsn.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2003-2004 The OpenLDAP Foundation. + * Copyright 2003-2005 The OpenLDAP Foundation. * Portions Copyright 2003 IBM Corporation. * All rights reserved. * @@ -183,7 +183,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 )