diff options
author | Werner Koch <wk@gnupg.org> | 2010-03-11 13:34:11 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2010-03-11 13:34:11 +0100 |
commit | 37870234a195fb76f36284ac4bdb5dc172078724 (patch) | |
tree | f65b4c42925edb20ff4149a977d12a4d31d432a0 /g10 | |
parent | Change logging to use estream. The makes logging to a socket also (diff) | |
download | gnupg2-37870234a195fb76f36284ac4bdb5dc172078724.tar.xz gnupg2-37870234a195fb76f36284ac4bdb5dc172078724.zip |
Use a custom log handler for libassuan.
Diffstat (limited to 'g10')
-rw-r--r-- | g10/ChangeLog | 7 | ||||
-rw-r--r-- | g10/gpg.c | 3 | ||||
-rw-r--r-- | g10/server.c | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index b77ed8d9c..878627c12 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,10 @@ +2010-03-11 Werner Koch <wk@g10code.com> + + * gpg.c: Include "asshelp.h". + (main): Remove assuan_set_assuan_log_prefix. Add + assuan_set_log_cb. + * server.c (gpg_server): Remove assuan_set_log_stream. + 2010-03-10 Werner Koch <wk@g10code.com> * Makefile.am (needed_libs): Remove libjnlib.a. @@ -53,6 +53,7 @@ #include "keyserver-internal.h" #include "exec.h" #include "gc-opt-flags.h" +#include "asshelp.h" #if defined(HAVE_DOSISH_SYSTEM) || defined(__CYGWIN__) #define MY_O_BINARY O_BINARY @@ -2070,8 +2071,8 @@ main (int argc, char **argv) malloc_hooks.realloc = gcry_realloc; malloc_hooks.free = gcry_free; assuan_set_malloc_hooks (&malloc_hooks); - assuan_set_assuan_log_prefix (log_get_prefix (NULL)); assuan_set_gpg_err_source (GPG_ERR_SOURCE_DEFAULT); + setup_libassuan_logging (&opt.debug); /* Try for a version specific config file first */ default_configname = get_default_configname (); diff --git a/g10/server.c b/g10/server.c index 3aca9b9de..f67a34677 100644 --- a/g10/server.c +++ b/g10/server.c @@ -735,9 +735,6 @@ gpg_server (ctrl_t ctrl) ctrl->server_local->assuan_ctx = ctx; ctrl->server_local->message_fd = GNUPG_INVALID_FD; - if (DBG_ASSUAN) - assuan_set_log_stream (ctx, log_get_stream ()); - for (;;) { rc = assuan_accept (ctx); |