[git] GnuPG - branch, STABLE-BRANCH-2-2, updated. gnupg-2.2.3-11-g2fedf85
by Werner Koch
cvs at cvs.gnupg.org
Thu Dec 7 14:58:38 CET 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-2 has been updated
via 2fedf8583bcc493f587c90bc9632d25dfd10bd10 (commit)
via b9677ba16f6b386896781a751e4b2fc839e3ec81 (commit)
from 1524ba9656f0205d8c6ef504f773b832a7a12ab9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 2fedf8583bcc493f587c90bc9632d25dfd10bd10
Author: Werner Koch <wk at gnupg.org>
Date: Thu Dec 7 14:53:49 2017 +0100
build: Do not define logging.h constants for libgpg-error dev versions.
* common/logging.h [GPGRT_LOG_WITH_PREFIX]: Do not define the log
constants.
--
logging.h uses constants we plan to use for future versions of
libgpg-error. My dev version already has the logging functions and
thus I run into a conflict. This patch protects against this and make
the GnuPG work with later libgpg-error versions.
It was not the best idea to use constants from a planned libgpg-error
in the first place. The actual problem are the enums, the macros
won't harm.
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/common/logging.h b/common/logging.h
index e1bf56b..c6a32b4 100644
--- a/common/logging.h
+++ b/common/logging.h
@@ -70,15 +70,21 @@ estream_t log_get_stream (void);
: _log_assert (#expr, __FILE__, __LINE__))
#endif /*!GPGRT_HAVE_MACRO_FUNCTION*/
-/* Flag values for log_set_prefix. */
-#define GPGRT_LOG_WITH_PREFIX 1
-#define GPGRT_LOG_WITH_TIME 2
-#define GPGRT_LOG_WITH_PID 4
-#define GPGRT_LOG_RUN_DETACHED 256
-#define GPGRT_LOG_NO_REGISTRY 512
-/* Log levels as used by log_log. */
-enum jnlib_log_levels {
+/* If we use an older libgpg-error we need to define the constants
+ * which will be used by current libgpg-error development
+ * versions. */
+#ifndef GPGRT_LOG_WITH_PREFIX
+
+ /* Flag values for log_set_prefix. */
+# define GPGRT_LOG_WITH_PREFIX 1
+# define GPGRT_LOG_WITH_TIME 2
+# define GPGRT_LOG_WITH_PID 4
+# define GPGRT_LOG_RUN_DETACHED 256
+# define GPGRT_LOG_NO_REGISTRY 512
+
+ /* Log levels as used by log_log. */
+ enum jnlib_log_levels {
GPGRT_LOG_BEGIN,
GPGRT_LOG_CONT,
GPGRT_LOG_INFO,
@@ -87,7 +93,9 @@ enum jnlib_log_levels {
GPGRT_LOG_FATAL,
GPGRT_LOG_BUG,
GPGRT_LOG_DEBUG
-};
+ };
+#endif /* Old libgpg-error. */
+
void log_log (int level, const char *fmt, ...) GPGRT_ATTR_PRINTF(2,3);
void log_logv (int level, const char *fmt, va_list arg_ptr);
void log_logv_with_prefix (int level, const char *prefix,
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>
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 ();
-----------------------------------------------------------------------
Summary of changes:
agent/gpg-agent.c | 3 ++-
common/logging.h | 26 +++++++++++++++++---------
2 files changed, 19 insertions(+), 10 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list