From 0dd62395788ae566d3adef967611bce214a04435 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sun, 23 Dec 2018 14:11:00 +0100 Subject: trust: Propagate library verbosity to module through init_args Previously, even when the -v option is used with the 'trust' command, the messages from p11-kit-trust.so module were suppressed because the verbosity setting is not propagated to the module. --- common/message.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/message.c b/common/message.c index f9d4f57..e439def 100644 --- a/common/message.c +++ b/common/message.c @@ -58,7 +58,7 @@ #include #include -static bool print_messages = false; +bool p11_print_messages = false; #ifdef HAVE_STRERROR_L locale_t p11_message_locale = (locale_t) 0; @@ -148,7 +148,7 @@ p11_message (const char* msg, buffer[length] = 0; /* If printing is not disabled, just print out */ - if (print_messages) + if (p11_print_messages) fprintf (stderr, "p11-kit: %s\n", buffer); else p11_debug_message (P11_DEBUG_LIB, "message: %s", buffer); @@ -158,13 +158,13 @@ p11_message (const char* msg, void p11_message_quiet (void) { - print_messages = false; + p11_print_messages = false; } void p11_message_loud (void) { - print_messages = true; + p11_print_messages = true; } const char * -- cgit v1.1