From 9d3fdd8c96b79ecbd56cf6b1a424bb2e2cd5236d Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Fri, 30 Oct 2009 14:21:08 +0000 Subject: 2009-10-30 Marcus Brinkmann * configure.ac: Check for argp.h and error_t. src/ 2009-10-30 Marcus Brinkmann * Makefile.am (noinst_PROGRAMS): New target gpgme-tool. (gpgme_tool_LDADD): New variable. * gpgme-tool.c: New file. * ops.h (_gpgme_sig_notation_clearm _gpgme_signers_clear): New prototypes. * gpgme.c (gpgme_set_protocol): Allow GPGME_PROTOCOL_GPGCONF (when had that gone missing?). (_gpgme_sig_notation_clear): New function without debug output. (gpgme_release): Call it and _gpgme_signers_clear. * signers.c (_gpgme_signers_clear): New function without debug output. * g13.c (gpgme_op_vfs_mount): Add debug output. * assuan-support.c (my_spawn): Allow fd_child_list to be NULL. * conversion.c (_gpgme_encode_percent_string): Fix infinite loop. * debug.h: Put tag in front of debug lines, should make for nicer output. * engine-assuan.c (llass_new): Use our new system hooks for libassuan. * engine-g13.c (g13_new): Remove redundant assuan context allocation. * version.c (gpgme_check_version_internal): Delay debug output until after gpgme_check_version was called. --- src/gpgme.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/gpgme.c') diff --git a/src/gpgme.c b/src/gpgme.c index 52e14d7c..70f93f1a 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -186,8 +186,8 @@ gpgme_release (gpgme_ctx_t ctx) _gpgme_engine_release (ctx->engine); _gpgme_fd_table_deinit (&ctx->fdt); _gpgme_release_result (ctx); - gpgme_signers_clear (ctx); - gpgme_sig_notation_clear (ctx); + _gpgme_signers_clear (ctx); + _gpgme_sig_notation_clear (ctx); if (ctx->signers) free (ctx->signers); if (ctx->lc_ctype) @@ -269,6 +269,7 @@ gpgme_set_protocol (gpgme_ctx_t ctx, gpgme_protocol_t protocol) if (protocol != GPGME_PROTOCOL_OpenPGP && protocol != GPGME_PROTOCOL_CMS + && protocol != GPGME_PROTOCOL_GPGCONF && protocol != GPGME_PROTOCOL_ASSUAN && protocol != GPGME_PROTOCOL_G13) return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE)); @@ -311,6 +312,9 @@ gpgme_get_protocol_name (gpgme_protocol_t protocol) case GPGME_PROTOCOL_CMS: return "CMS"; + case GPGME_PROTOCOL_GPGCONF: + return "GPGCONF"; + case GPGME_PROTOCOL_ASSUAN: return "Assuan"; @@ -654,10 +658,9 @@ gpgme_ctx_set_engine_info (gpgme_ctx_t ctx, gpgme_protocol_t proto, /* Clear all notation data from the context. */ void -gpgme_sig_notation_clear (gpgme_ctx_t ctx) +_gpgme_sig_notation_clear (gpgme_ctx_t ctx) { gpgme_sig_notation_t notation; - TRACE (DEBUG_CTX, "gpgme_sig_notation_clear", ctx); if (!ctx) return; @@ -672,6 +675,13 @@ gpgme_sig_notation_clear (gpgme_ctx_t ctx) ctx->sig_notations = NULL; } +void +gpgme_sig_notation_clear (gpgme_ctx_t ctx) +{ + TRACE (DEBUG_CTX, "gpgme_sig_notation_clear", ctx); + _gpgme_sig_notation_clear (ctx); +} + /* Add the human-readable notation data with name NAME and value VALUE to the context CTX, using the flags FLAGS. If NAME is NULL, then -- cgit v1.2.3