* decrypt.c (gpgme_op_decrypt_start): Fix use of debug macro.
* decrypt-verify.c (gpgme_op_decrypt_verify_start): Likewise.
* delete.c (gpgme_op_delete_start): Likewise.
* edit.c (gpgme_op_edit_start, gpgme_op_card_edit_start):
Likewise.
* encrypt.c (gpgme_op_encrypt_start): Likewise.
* encrypt-sign.c (gpgme_op_encrypt_sign_start): Likewise.
* export.c (gpgme_op_export_start, gpgme_op_export_ext_start)
(gpgme_op_export_keys_start, gpgme_op_export_keys): Likewise.
* genkey.c (gpgme_op_genkey_start): Likewise.
* getauditlog.c (gpgme_op_getauditlog_start): Likewise.
* import.c (gpgme_op_import_start, gpgme_op_import_keys_start):
Likewise.
* opassuan.c (gpgme_op_assuan_transact_start): Likewise.
* sign.c (gpgme_op_sign_start): Likewise.
* verify.c (gpgme_op_verify_start): Likewise.
* vfs-create.c (gpgme_op_vfs_create): Likewise.
* vfs-mount.c (gpgme_op_vfs_mount): Likewise.
+2009-11-05 Marcus Brinkmann <marcus@g10code.de>
+
+ * decrypt.c (gpgme_op_decrypt_start): Fix use of debug macro.
+ * decrypt-verify.c (gpgme_op_decrypt_verify_start): Likewise.
+ * delete.c (gpgme_op_delete_start): Likewise.
+ * edit.c (gpgme_op_edit_start, gpgme_op_card_edit_start):
+ Likewise.
+ * encrypt.c (gpgme_op_encrypt_start): Likewise.
+ * encrypt-sign.c (gpgme_op_encrypt_sign_start): Likewise.
+ * export.c (gpgme_op_export_start, gpgme_op_export_ext_start)
+ (gpgme_op_export_keys_start, gpgme_op_export_keys): Likewise.
+ * genkey.c (gpgme_op_genkey_start): Likewise.
+ * getauditlog.c (gpgme_op_getauditlog_start): Likewise.
+ * import.c (gpgme_op_import_start, gpgme_op_import_keys_start):
+ Likewise.
+ * opassuan.c (gpgme_op_assuan_transact_start): Likewise.
+ * sign.c (gpgme_op_sign_start): Likewise.
+ * verify.c (gpgme_op_verify_start): Likewise.
+ * vfs-create.c (gpgme_op_vfs_create): Likewise.
+ * vfs-mount.c (gpgme_op_vfs_mount): Likewise.
+
2009-11-04 Marcus Brinkmann <marcus@g10code.de>
* ath.h (ath_self): New prototype. Include <stdint.h>
gpgme_op_decrypt_verify_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
gpgme_data_t plain)
{
+ gpgme_error_t err;
+
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt_verify_start", ctx,
"cipher=%p, plain=%p", cipher, plain);
- return TRACE_ERR (decrypt_verify_start (ctx, 0, cipher, plain));
+ err = decrypt_verify_start (ctx, 0, cipher, plain);
+ return TRACE_ERR (err);
}
gpgme_op_decrypt_start (gpgme_ctx_t ctx, gpgme_data_t cipher,
gpgme_data_t plain)
{
+ gpgme_error_t err;
+
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_decrypt_start", ctx,
"cipher=%p, plain=%p", cipher, plain);
- return TRACE_ERR (decrypt_start (ctx, 0, cipher, plain));
+ err = decrypt_start (ctx, 0, cipher, plain);
+ return TRACE_ERR (err);
}
gpgme_op_delete_start (gpgme_ctx_t ctx, const gpgme_key_t key,
int allow_secret)
{
+ gpgme_error_t err;
+
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_delete", ctx,
"key=%p (%s), allow_secret=%i", key,
(key->subkeys && key->subkeys->fpr) ?
key->subkeys->fpr : "invalid", allow_secret);
- return TRACE_ERR (delete_start (ctx, 0, key, allow_secret));
+ err = delete_start (ctx, 0, key, allow_secret);
+ return TRACE_ERR (err);
}
gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
gpgme_edit_cb_t fnc, void *fnc_value, gpgme_data_t out)
{
+ gpgme_error_t err;
+
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));
+ err = edit_start (ctx, 0, 0, key, fnc, fnc_value, out);
+ return err;
}
gpgme_edit_cb_t fnc, void *fnc_value,
gpgme_data_t out)
{
+ gpgme_error_t err;
+
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));
+ err = edit_start (ctx, 0, 1, key, fnc, fnc_value, out);
+ return err;
}
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher)
{
+ gpgme_error_t err;
+
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_encrypt_sign_start", ctx,
"flags=0x%x, plain=%p, cipher=%p", flags, plain, cipher);
}
}
- return TRACE_ERR (encrypt_sign_start (ctx, 0, recp, flags, plain, cipher));
+ err = encrypt_sign_start (ctx, 0, recp, flags, plain, cipher);
+ return err;
}
gpgme_encrypt_flags_t flags,
gpgme_data_t plain, gpgme_data_t cipher)
{
+ gpgme_error_t err;
+
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_encrypt_start", ctx,
"flags=0x%x, plain=%p, cipher=%p", flags, plain, cipher);
}
}
- return TRACE_ERR (encrypt_start (ctx, 0, recp, flags, plain, cipher));
+ err = encrypt_start (ctx, 0, recp, flags, plain, cipher);
+ return TRACE_ERR (err);
}
gpgme_op_export_start (gpgme_ctx_t ctx, const char *pattern,
gpgme_export_mode_t mode, gpgme_data_t keydata)
{
+ gpgme_error_t err;
+
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_export_start", ctx,
"pattern=%s, mode=0x%x, keydata=%p", pattern, mode, keydata);
- return TRACE_ERR (export_start (ctx, 0, pattern, mode, keydata));
+ err = export_start (ctx, 0, pattern, mode, keydata);
+ return TRACE_ERR (err);
}
gpgme_op_export_ext_start (gpgme_ctx_t ctx, const char *pattern[],
gpgme_export_mode_t mode, gpgme_data_t keydata)
{
+ gpgme_error_t err;
+
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_export_ext_start", ctx,
"mode=0x%x, keydata=%p", mode, keydata);
}
}
- return TRACE_ERR (export_ext_start (ctx, 0, pattern, mode, keydata));
+ err = export_ext_start (ctx, 0, pattern, mode, keydata);
+ return TRACE_ERR (err);
}
gpgme_export_mode_t mode,
gpgme_data_t keydata)
{
+ gpg_error_t err;
+
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_export_keys_start", ctx,
"mode=0x%x, keydata=%p", mode, keydata);
}
}
- return TRACE_ERR (export_keys_start (ctx, 0, keys, mode, keydata));
+ err = export_keys_start (ctx, 0, keys, mode, keydata);
+ return TRACE_ERR (err);
}
gpgme_error_t
err = export_keys_start (ctx, 1, keys, mode, keydata);
if (!err)
err = _gpgme_wait_one (ctx);
- return err;
+ return TRACE_ERR (err);
}
gpgme_op_genkey_start (gpgme_ctx_t ctx, const char *parms,
gpgme_data_t pubkey, gpgme_data_t seckey)
{
+ gpgme_error_t err;
+
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_genkey_start", ctx,
"pubkey=%p, seckey=%p", pubkey, seckey);
TRACE_LOGBUF (parms, strlen (parms));
- return TRACE_ERR (genkey_start (ctx, 0, parms, pubkey, seckey));
+ err = genkey_start (ctx, 0, parms, pubkey, seckey);
+ return TRACE_ERR (err);
}
+
/* getauditlog.c - Retrieve the audit log.
Copyright (C) 2007 g10 Code GmbH
gpgme_op_getauditlog_start (gpgme_ctx_t ctx,
gpgme_data_t output, unsigned int flags)
{
+ gpg_error_t err;
TRACE_BEG2 (DEBUG_CTX, "gpgme_op_getauditlog_start", ctx,
"output=%p, flags=0x%x", output, flags);
- return TRACE_ERR (getauditlog_start (ctx, 0, output, flags));
+ err = getauditlog_start (ctx, 0, output, flags);
+ return TRACE_ERR (err);
}
gpg_error_t err;
gpg_error_t op_err;
err = gpgme_op_vfs_mount (gt->ctx, container_file, mount_dir, flags, &op_err);
- return err || op_err;
+ return err ? err : op_err;
}
err = gpgme_op_vfs_create (gt->ctx, gt->recipients, container_file,
flags, &op_err);
gt_recipients_clear (gt);
- return err || op_err;
+ return err ? err : op_err;
}
gpgme_error_t
gpgme_op_import_start (gpgme_ctx_t ctx, gpgme_data_t keydata)
{
+ gpg_error_t err;
+
TRACE_BEG1 (DEBUG_CTX, "gpgme_op_import_start", ctx,
"keydata=%p", keydata);
- return TRACE_ERR (_gpgme_op_import_start (ctx, 0, keydata));
+ err = _gpgme_op_import_start (ctx, 0, keydata);
+ return TRACE_ERR (err);
}
gpgme_error_t
gpgme_op_import_keys_start (gpgme_ctx_t ctx, gpgme_key_t *keys)
{
+ gpg_error_t err;
+
TRACE_BEG (DEBUG_CTX, "gpgme_op_import_keys_start", ctx);
if (_gpgme_debug_trace () && keys)
{
}
}
- return TRACE_ERR (_gpgme_op_import_keys_start (ctx, 0, keys));
+ err = _gpgme_op_import_keys_start (ctx, 0, keys);
+ return TRACE_ERR (err);
}
gpgme_assuan_status_cb_t status_cb,
void *status_cb_value)
{
+ gpg_error_t err;
+
TRACE_BEG7 (DEBUG_CTX, "gpgme_op_assuan_transact_start", ctx,
"command=%s, data_cb=%p/%p, inq_cb=%p/%p, status_cb=%p/%p",
command, data_cb, data_cb_value, inq_cb, inq_cb_value,
status_cb, status_cb_value);
- return TRACE_ERR (opassuan_start (ctx, 0, command,
- data_cb, data_cb_value,
- inq_cb, inq_cb_value,
- status_cb, status_cb_value));
+ err = opassuan_start (ctx, 0, command, data_cb, data_cb_value,
+ inq_cb, inq_cb_value, status_cb, status_cb_value);
+ return TRACE_ERR (err);
}
gpgme_op_sign_start (gpgme_ctx_t ctx, gpgme_data_t plain, gpgme_data_t sig,
gpgme_sig_mode_t mode)
{
+ gpg_error_t err;
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_sign_start", ctx,
"plain=%p, sig=%p, mode=%i", plain, sig, mode);
- return TRACE_ERR (sign_start (ctx, 0, plain, sig, mode));
+ err = sign_start (ctx, 0, plain, sig, mode);
+ return TRACE_ERR (err);
}
gpgme_op_verify_start (gpgme_ctx_t ctx, gpgme_data_t sig,
gpgme_data_t signed_text, gpgme_data_t plaintext)
{
+ gpg_error_t err;
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_verify_start", ctx,
"sig=%p, signed_text=%p, plaintext=%p",
sig, signed_text, plaintext);
- return TRACE_ERR (verify_start (ctx, 0, sig, signed_text, plaintext));
+ err = verify_start (ctx, 0, sig, signed_text, plaintext);
+ return TRACE_ERR (err);
}
const char *container_file, unsigned int flags,
gpgme_error_t *op_err)
{
+ gpg_error_t err;
+
TRACE_BEG3 (DEBUG_CTX, "gpgme_op_vfs_create", ctx,
"container_file=%s, flags=0x%x, op_err=%p",
container_file, flags, op_err);
if (_gpgme_debug_trace () && recp)
{
int i = 0;
-
+
while (recp[i])
{
TRACE_LOG3 ("recipient[%i] = %p (%s)", i, recp[i],
}
}
- return TRACE_ERR (_gpgme_op_vfs_create (ctx, recp, container_file,
- flags, op_err));
+ err = _gpgme_op_vfs_create (ctx, recp, container_file, flags, op_err);
+ return TRACE_ERR (err);
}
const char *mount_dir, unsigned int flags,
gpgme_error_t *op_err)
{
+ gpg_error_t err;
+
TRACE_BEG4 (DEBUG_CTX, "gpgme_op_vfs_mount", ctx,
"container=%s, mount_dir=%s, flags=0x%x, op_err=%p",
container_file, mount_dir, flags, op_err);
- return TRACE_ERR (_gpgme_op_vfs_mount (ctx, container_file, mount_dir,
- flags, op_err));
+ err = _gpgme_op_vfs_mount (ctx, container_file, mount_dir, flags, op_err);
+ return TRACE_ERR (err);
}