From: Ondřej Kuzník Date: Tue, 31 Aug 2021 10:33:01 +0000 (+0100) Subject: ITS#9650 Move ldap_pvt_thread_initialize into main.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c34f2a1b290706fdaab3ba867293122d06ec638d;p=thirdparty%2Fopenldap.git ITS#9650 Move ldap_pvt_thread_initialize into main.c --- diff --git a/servers/lloadd/libevent_support.c b/servers/lloadd/libevent_support.c index ebed3341ce..67892bdb01 100644 --- a/servers/lloadd/libevent_support.c +++ b/servers/lloadd/libevent_support.c @@ -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 ); diff --git a/servers/lloadd/main.c b/servers/lloadd/main.c index 44ae878a05..f75e034fba 100644 --- a/servers/lloadd/main.c +++ b/servers/lloadd/main.c @@ -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