1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

dirmngr: Fix hang due to deferred thread initialization.

* dirmngr/dirmngr.c (main): Call ldap_wrapper_launch_thread after
thread_init.
--

Fixes-commit: eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-10-26 10:24:41 +02:00
parent b77f95a4a6
commit d1ccab5176
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -983,13 +983,13 @@ main (int argc, char **argv)
log_debug ("... okay\n");
}
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
thread_init ();
cert_cache_init ();
crl_cache_init ();
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
start_command_handler (ASSUAN_INVALID_FD);
shutdown_reaper ();
}
@ -1182,13 +1182,12 @@ main (int argc, char **argv)
}
#endif
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
thread_init ();
cert_cache_init ();
crl_cache_init ();
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
handle_connections (fd);
assuan_sock_close (fd);
shutdown_reaper ();
@ -1211,12 +1210,12 @@ main (int argc, char **argv)
memset (&ctrlbuf, 0, sizeof ctrlbuf);
dirmngr_init_default_ctrl (&ctrlbuf);
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
thread_init ();
cert_cache_init ();
crl_cache_init ();
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
if (!argc)
rc = crl_cache_load (&ctrlbuf, NULL);
else
@ -1237,12 +1236,12 @@ main (int argc, char **argv)
memset (&ctrlbuf, 0, sizeof ctrlbuf);
dirmngr_init_default_ctrl (&ctrlbuf);
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
thread_init ();
cert_cache_init ();
crl_cache_init ();
#if USE_LDAP
ldap_wrapper_launch_thread ();
#endif /*USE_LDAP*/
rc = crl_fetch (&ctrlbuf, argv[0], &reader);
if (rc)
log_error (_("fetching CRL from '%s' failed: %s\n"),