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.
This commit is contained in:
Marcus Brinkmann 2009-11-05 02:17:07 +00:00
parent 49693e8e45
commit 65ecec1abe
17 changed files with 100 additions and 28 deletions

View File

@ -1,3 +1,24 @@
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>

View File

@ -87,9 +87,12 @@ gpgme_error_t
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);
}

View File

@ -365,9 +365,12 @@ gpgme_error_t
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);
}

View File

@ -94,11 +94,14 @@ gpgme_error_t
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);
}

View File

@ -139,11 +139,14 @@ 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)
{
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;
}
@ -173,11 +176,14 @@ 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)
{
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;
}

View File

@ -92,6 +92,8 @@ gpgme_op_encrypt_sign_start (gpgme_ctx_t ctx, gpgme_key_t recp[],
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);
@ -108,7 +110,8 @@ gpgme_op_encrypt_sign_start (gpgme_ctx_t ctx, gpgme_key_t recp[],
}
}
return TRACE_ERR (encrypt_sign_start (ctx, 0, recp, flags, plain, cipher));
err = encrypt_sign_start (ctx, 0, recp, flags, plain, cipher);
return err;
}

View File

@ -227,6 +227,8 @@ gpgme_op_encrypt_start (gpgme_ctx_t ctx, gpgme_key_t recp[],
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);
@ -243,7 +245,8 @@ gpgme_op_encrypt_start (gpgme_ctx_t ctx, gpgme_key_t recp[],
}
}
return TRACE_ERR (encrypt_start (ctx, 0, recp, flags, plain, cipher));
err = encrypt_start (ctx, 0, recp, flags, plain, cipher);
return TRACE_ERR (err);
}

View File

@ -75,9 +75,12 @@ gpgme_error_t
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);
}
@ -134,6 +137,8 @@ gpgme_error_t
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);
@ -148,7 +153,8 @@ gpgme_op_export_ext_start (gpgme_ctx_t ctx, const char *pattern[],
}
}
return TRACE_ERR (export_ext_start (ctx, 0, pattern, mode, keydata));
err = export_ext_start (ctx, 0, pattern, mode, keydata);
return TRACE_ERR (err);
}
@ -244,6 +250,8 @@ gpgme_op_export_keys_start (gpgme_ctx_t ctx,
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);
@ -260,7 +268,8 @@ gpgme_op_export_keys_start (gpgme_ctx_t ctx,
}
}
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
@ -290,6 +299,6 @@ gpgme_op_export_keys (gpgme_ctx_t ctx,
err = export_keys_start (ctx, 1, keys, mode, keydata);
if (!err)
err = _gpgme_wait_one (ctx);
return err;
return TRACE_ERR (err);
}

View File

@ -197,10 +197,13 @@ gpgme_error_t
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);
}

View File

@ -1,3 +1,4 @@
/* getauditlog.c - Retrieve the audit log.
Copyright (C) 2007 g10 Code GmbH
@ -63,9 +64,11 @@ gpgme_error_t
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);
}

View File

@ -1041,7 +1041,7 @@ gt_vfs_mount (gpgme_tool_t gt, const char *container_file,
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;
}
@ -1053,7 +1053,7 @@ gt_vfs_create (gpgme_tool_t gt, const char *container_file, int flags)
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;
}

View File

@ -283,10 +283,13 @@ _gpgme_op_import_start (gpgme_ctx_t ctx, int synchronous, gpgme_data_t keydata)
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);
}
@ -358,6 +361,8 @@ _gpgme_op_import_keys_start (gpgme_ctx_t ctx, int synchronous,
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)
{
@ -372,7 +377,8 @@ gpgme_op_import_keys_start (gpgme_ctx_t ctx, gpgme_key_t *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);
}

View File

@ -69,15 +69,16 @@ gpgme_op_assuan_transact_start (gpgme_ctx_t ctx,
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);
}

View File

@ -386,9 +386,11 @@ gpgme_error_t
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);
}

View File

@ -832,10 +832,12 @@ gpgme_error_t
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);
}

View File

@ -170,6 +170,8 @@ gpgme_op_vfs_create (gpgme_ctx_t ctx, gpgme_key_t recp[],
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);
@ -187,7 +189,7 @@ gpgme_op_vfs_create (gpgme_ctx_t ctx, gpgme_key_t recp[],
}
}
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);
}

View File

@ -201,10 +201,12 @@ gpgme_op_vfs_mount (gpgme_ctx_t ctx, const char *container_file,
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);
}