]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/init.c
Backout the input exhaustion change, it loops. Still looking for
[openldap] / servers / slapd / init.c
index f464c61e93d0c483dfea2f551a2e4e9941aef734..dc5091066331c30df0bd8eec0bbc602b66d470ff 100644 (file)
@@ -23,7 +23,7 @@ int           ldap_syslog;
 #endif
 
 int            ldap_syslog_level = LOG_DEBUG;
-char           *default_referral;
+struct berval **default_referral = NULL;
 int            g_argc;
 char           **g_argv;
 
@@ -40,12 +40,14 @@ ldap_pvt_thread_mutex_t     crypt_mutex;
 #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()
@@ -57,7 +59,6 @@ ldap_pvt_thread_mutex_t       replog_mutex;
 static char* slap_name;
 int slapMode = SLAP_UNDEFINED_MODE;
 
-static time_t                  currenttime;
 static ldap_pvt_thread_mutex_t currenttime_mutex;
 
 int
@@ -97,7 +98,7 @@ slap_init( int mode, char *name )
                        ldap_pvt_thread_mutex_init( &currenttime_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 );
@@ -155,24 +156,18 @@ int slap_destroy(void)
 
        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( &currenttime_mutex );
-       time( &currenttime );
-       ldap_pvt_thread_mutex_unlock( &currenttime_mutex );
-}
-
 time_t slap_get_time(void)
 {
        time_t t;
        ldap_pvt_thread_mutex_lock( &currenttime_mutex );
-       t = currenttime;
+       time( &t );
        ldap_pvt_thread_mutex_unlock( &currenttime_mutex );
        return t;
 }