#endif
int ldap_syslog_level = LOG_DEBUG;
-char *default_referral;
+struct berval **default_referral = NULL;
int g_argc;
char **g_argv;
#endif
int num_conns;
-long ops_initiated;
-long ops_completed;
-ldap_pvt_thread_mutex_t ops_mutex;
+long num_ops_initiated;
+long num_ops_completed;
+ldap_pvt_thread_mutex_t num_ops_mutex;
long num_entries_sent;
+long num_refs_sent;
long num_bytes_sent;
+long num_pdu_sent;
ldap_pvt_thread_mutex_t num_sent_mutex;
/*
* these mutexes must be used when calling the entry2str()
static char* slap_name;
int slapMode = SLAP_UNDEFINED_MODE;
-static time_t currenttime;
static ldap_pvt_thread_mutex_t currenttime_mutex;
int
ldap_pvt_thread_mutex_init( ¤ttime_mutex );
ldap_pvt_thread_mutex_init( &entry2str_mutex );
ldap_pvt_thread_mutex_init( &replog_mutex );
- ldap_pvt_thread_mutex_init( &ops_mutex );
+ ldap_pvt_thread_mutex_init( &num_ops_mutex );
ldap_pvt_thread_mutex_init( &num_sent_mutex );
ldap_pvt_thread_mutex_init( &gmtime_mutex );
rc = backend_destroy();
+ ldap_pvt_thread_destroy();
+
/* should destory the above mutex */
return rc;
}
/* should create a utils.c for these */
-
-void slap_set_time(void)
-{
- ldap_pvt_thread_mutex_lock( ¤ttime_mutex );
- time( ¤ttime );
- ldap_pvt_thread_mutex_unlock( ¤ttime_mutex );
-}
-
time_t slap_get_time(void)
{
time_t t;
ldap_pvt_thread_mutex_lock( ¤ttime_mutex );
- t = currenttime;
+ time( &t );
ldap_pvt_thread_mutex_unlock( ¤ttime_mutex );
return t;
}