LDAPModList **m;
LDAPModList *tmp;
struct tm *ltm;
+ time_t currenttime;
Debug( LDAP_DEBUG_TRACE, "add_lastmods\n", 0, 0, 0 );
tmp->ml_next = *modlist;
*modlist = tmp;
- ldap_pvt_thread_mutex_lock( ¤ttime_mutex );
+ currenttime = slap_get_time();
+ ldap_pvt_thread_mutex_lock( &gmtime_mutex );
#ifndef LDAP_LOCALTIME
ltm = gmtime( ¤ttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
ltm = localtime( ¤ttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif
- ldap_pvt_thread_mutex_unlock( ¤ttime_mutex );
+ ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
+
bv.bv_val = buf;
bv.bv_len = strlen( bv.bv_val );
tmp = (LDAPModList *) ch_calloc( 1, sizeof(LDAPModList) );