diff options
Diffstat (limited to '')
-rw-r--r-- | src/edit.c | 35 |
1 files changed, 29 insertions, 6 deletions
@@ -24,6 +24,7 @@ #include <stdlib.h> #include "gpgme.h" +#include "debug.h" #include "context.h" #include "ops.h" @@ -138,7 +139,11 @@ gpgme_error_t gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key, gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out) { - return edit_start (ctx, 0, 0, key, fnc, fnc_value, out); + TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit_start", ctx, + "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, + (key->subkeys && !key->subkeys->fpr) ? + key->subkeys->fpr : "invalid", fnc, fnc_value, out); + return TRACE_ERR (edit_start (ctx, 0, 0, key, fnc, fnc_value, out)); } @@ -148,10 +153,18 @@ gpgme_error_t gpgme_op_edit (gpgme_ctx_t ctx, gpgme_key_t key, gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out) { - gpgme_error_t err = edit_start (ctx, 1, 0, key, fnc, fnc_value, out); + gpgme_error_t err; + + TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit", ctx, + "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, + (key->subkeys && !key->subkeys->fpr) ? + key->subkeys->fpr : "invalid", fnc, fnc_value, out); + + err = edit_start (ctx, 1, 0, key, fnc, fnc_value, out); + if (!err) err = _gpgme_wait_one (ctx); - return err; + return TRACE_ERR (err); } @@ -160,7 +173,11 @@ gpgme_op_card_edit_start (gpgme_ctx_t ctx, gpgme_key_t key, gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out) { - return edit_start (ctx, 0, 1, key, fnc, fnc_value, out); + TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit_start", ctx, + "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, + (key->subkeys && !key->subkeys->fpr) ? + key->subkeys->fpr : "invalid", fnc, fnc_value, out); + return TRACE_ERR (edit_start (ctx, 0, 1, key, fnc, fnc_value, out)); } @@ -170,8 +187,14 @@ gpgme_error_t gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key, gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out) { - gpgme_error_t err = edit_start (ctx, 1, 1, key, fnc, fnc_value, out); + gpgme_error_t err; + + TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit", ctx, + "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key, + (key->subkeys && !key->subkeys->fpr) ? + key->subkeys->fpr : "invalid", fnc, fnc_value, out); + err = edit_start (ctx, 1, 1, key, fnc, fnc_value, out); if (!err) err = _gpgme_wait_one (ctx); - return err; + return TRACE_ERR (err); } |