[Pkg-gnupg-commit] [gnupg2] 10/42: agent: Change intialization of assuan socket system hooks.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Jan 3 18:25:52 UTC 2018
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch upstream
in repository gnupg2.
commit b9677ba16f6b386896781a751e4b2fc839e3ec81
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Thu Dec 7 14:33:58 2017 +0100
agent: Change intialization of assuan socket system hooks.
* agent/gpg-agent.c (initialize_modules): Add hook again.
(main): Remove setting of the system houk but add scoket system hook
setting after assuan initialization.
--
Thread initialization is better to be deferred after fork (in case of
UNIX). assuan_sock_init should be earlier. Thus, we need to change
system hooks for assuan_sock_* interface. Or else, on Windows, it may
cause hang on server.
Updates-commit: 1524ba9656f0205d8c6ef504f773b832a7a12ab9
GnuPG-bug-id: 3378
Signed-off-by: Werner Koch <wk at gnupg.org>
---
agent/gpg-agent.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index b076ca3..21beb29 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -966,6 +966,7 @@ static void
initialize_modules (void)
{
thread_init_once ();
+ assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);
initialize_module_cache ();
initialize_module_call_pinentry ();
initialize_module_call_scd ();
@@ -1026,8 +1027,8 @@ main (int argc, char **argv )
malloc_hooks.free = gcry_free;
assuan_set_malloc_hooks (&malloc_hooks);
assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT);
- assuan_set_system_hooks (ASSUAN_SYSTEM_NPTH);
assuan_sock_init ();
+ assuan_sock_set_system_hooks (ASSUAN_SYSTEM_NPTH);
setup_libassuan_logging (&opt.debug, NULL);
setup_libgcrypt_logging ();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list