From 15163fb9b7b03543da02d74d75d0f49c314f1c33 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 29 Jan 2013 11:42:26 +0100 Subject: Add p11_kit_be_loud() function for use in tests and tools This does the opposite of p11_kit_be_quiet(). --- doc/p11-kit-sections.txt | 1 + p11-kit/p11-kit.h | 2 ++ p11-kit/util.c | 14 ++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/doc/p11-kit-sections.txt b/doc/p11-kit-sections.txt index f3f32a3..c6a4686 100644 --- a/doc/p11-kit-sections.txt +++ b/doc/p11-kit-sections.txt @@ -84,5 +84,6 @@ p11_kit_uri_type_t p11-kit-future p11_kit_set_progname p11_kit_be_quiet +p11_kit_be_loud p11_kit_message diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h index 77cf1b5..042ed44 100644 --- a/p11-kit/p11-kit.h +++ b/p11-kit/p11-kit.h @@ -84,6 +84,8 @@ void p11_kit_set_progname (const char *progname void p11_kit_be_quiet (void); +void p11_kit_be_loud (void); + const char* p11_kit_message (void); #endif diff --git a/p11-kit/util.c b/p11-kit/util.c index 9c5d99b..11a9a22 100644 --- a/p11-kit/util.c +++ b/p11-kit/util.c @@ -142,6 +142,20 @@ void p11_kit_be_quiet (void) { p11_message_quiet (); + p11_debug_init (); +} + +/** + * p11_kit_be_loud: + * + * Tell the p11-kit library will print failure or warning messages to stderr. + * This is the default behavior, but can be changed using p11_kit_be_quiet(). + */ +void +p11_kit_be_loud (void) +{ + p11_message_loud (); + p11_debug_init (); } /** -- cgit v1.1