]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9650 Move ldap_pvt_thread_initialize into main.c
authorOndřej Kuzník <ondra@mistotebe.net>
Tue, 31 Aug 2021 10:33:01 +0000 (11:33 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Sat, 4 Sep 2021 22:57:00 +0000 (22:57 +0000)
servers/lloadd/libevent_support.c
servers/lloadd/main.c

index ebed3341ce8a87070c9a432891699960e5615726..67892bdb0132b477881333446f7bf36f33f6eedd 100644 (file)
@@ -150,14 +150,6 @@ lload_libevent_init( void )
         lload_libevent_cond_timedwait
     };
 
-#ifndef BALANCER_MODULE
-    /* only necessary if lload is a server, slapd already calls
-     * ldap_pvt_thread_initialize() */
-    if ( ldap_pvt_thread_initialize() ) {
-        return -1;
-    }
-#endif
-
     evthread_set_lock_callbacks( &cbs );
     evthread_set_condition_callbacks( &cond_cbs );
     evthread_set_id_callback( ldap_pvt_thread_self );
index 44ae878a05f6a41733fc270604d7109225e9d381..f75e034fba0bd80f66fd15fdeaf304edf9b216ff 100644 (file)
@@ -378,6 +378,8 @@ main( int argc, char **argv )
 
     slap_sl_mem_init();
 
+    (void) ldap_pvt_thread_initialize();
+
     serverName = lutil_progname( "lloadd", argc, argv );
 
 #ifdef HAVE_NT_SERVICE_MANAGER