diff options
author | Werner Koch <[email protected]> | 2011-12-13 16:59:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2011-12-13 16:59:00 +0000 |
commit | 00c760f628f4cf0fc11e79d305c172f98123f815 (patch) | |
tree | ab9ddf55a16d46de5087273650beadd5f68371fa /common/asshelp.c | |
parent | scd: Introduce a virtual reader table. (diff) | |
download | gnupg-00c760f628f4cf0fc11e79d305c172f98123f815.tar.gz gnupg-00c760f628f4cf0fc11e79d305c172f98123f815.zip |
scd: New option --debug-assuan-log-cats.
* scd/scdaemon.c (oDebugAssuanLogCats): New.
(opts): Add option --debug-assuan-log-cats.
(main): Implement option.
* common/asshelp.c (set_libassuan_log_cats): New.
--
The old way of setting the logging categories with an environment
variable is awkward if sdaemon is spawned from a running gpg-agent.
Diffstat (limited to 'common/asshelp.c')
-rw-r--r-- | common/asshelp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/asshelp.c b/common/asshelp.c index c5d8bdf84..7ac6ff0cc 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -97,6 +97,19 @@ setup_libassuan_logging (unsigned int *debug_var_address) assuan_set_log_cb (my_libassuan_log_handler, debug_var_address); } +/* Change the Libassuan log categories to those given by NEWCATS. + NEWCATS is 0 the default category of ASSUAN_LOG_CONTROL is + selected. Note, that setup_libassuan_logging overrides the values + given here. */ +void +set_libassuan_log_cats (unsigned int newcats) +{ + if (newcats) + log_cats = newcats; + else /* Default to log the control channel. */ + log_cats = (1 << (ASSUAN_LOG_CONTROL - 1)); +} + static gpg_error_t |