summaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2010-03-11 13:34:11 +0100
committerWerner Koch <wk@gnupg.org>2010-03-11 13:34:11 +0100
commit37870234a195fb76f36284ac4bdb5dc172078724 (patch)
treef65b4c42925edb20ff4149a977d12a4d31d432a0 /sm
parentChange logging to use estream. The makes logging to a socket also (diff)
downloadgnupg2-37870234a195fb76f36284ac4bdb5dc172078724.tar.xz
gnupg2-37870234a195fb76f36284ac4bdb5dc172078724.zip
Use a custom log handler for libassuan.
Diffstat (limited to 'sm')
-rw-r--r--sm/ChangeLog7
-rw-r--r--sm/gpgsm.c4
-rw-r--r--sm/server.c3
3 files changed, 9 insertions, 5 deletions
diff --git a/sm/ChangeLog b/sm/ChangeLog
index 104f6caaf..ab25af8d4 100644
--- a/sm/ChangeLog
+++ b/sm/ChangeLog
@@ -1,3 +1,10 @@
+2010-03-11 Werner Koch <wk@g10code.com>
+
+ * gpgsm.c: Include "asshelp.h".
+ (main): Remove assuan_set_assuan_log_prefix. Add
+ assuan_set_log_cb.
+ * server.c (gpgsm_server): Remove assuan_set_log_stream.
+
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (common_libs): Remove libjnlib.a. Change order.
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index 39de29181..8774f7c32 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -37,7 +37,7 @@
#include "keydb.h"
#include "sysutils.h"
#include "gc-opt-flags.h"
-
+#include "asshelp.h"
#ifndef O_BINARY
#define O_BINARY 0
@@ -982,8 +982,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);
keybox_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
diff --git a/sm/server.c b/sm/server.c
index 42cadcca1..85c061312 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -1311,9 +1311,6 @@ gpgsm_server (certlist_t default_recplist)
ctrl.server_local->list_external = 0;
ctrl.server_local->default_recplist = default_recplist;
- if (DBG_ASSUAN)
- assuan_set_log_stream (ctx, log_get_stream ());
-
for (;;)
{
rc = assuan_accept (ctx);