aboutsummaryrefslogtreecommitdiffstats
path: root/src/status-table.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-08-25 11:22:43 +0000
committerWerner Koch <[email protected]>2015-08-25 11:23:51 +0000
commit8ddc5801ade02297924447df5745c8877a96e5e3 (patch)
tree0d26e47c4eef71c62c8e562d5b34a6e1d6019a0d /src/status-table.c
parenttests: Build test programs in tests/ without wrappers. (diff)
downloadgpgme-8ddc5801ade02297924447df5745c8877a96e5e3.tar.gz
gpgme-8ddc5801ade02297924447df5745c8877a96e5e3.zip
Improve error return by checking the FAILURE status.
* src/gpgme.h.in (GPGME_STATUS_FAILURE): New. * src/status-table.c (FAILURE): New. * src/op-support.c (_gpgme_parse_failure): New. * src/passphrase.c (_gpgme_passphrase_status_handler): Forward FAILURE status line to the status callback. * src/decrypt.c (op_data_t): Add field failure_code. (_gpgme_decrypt_status_handler): Parse that code and act upon it on EOF. * src/encrypt.c (op_data_t): Add field failure_code. (_gpgme_encrypt_status_handler): Parse that code and act upon it on EOF. * src/genkey.c (op_data_t): Add field failure_code. (genkey_status_handler): Parse that code and act upon it on EOF. * src/passwd.c (op_data_t): Add field failure_code. (passwd_status_handler): Parse that code and act upon it on EOF. * src/sign.c (op_data_t): Add field failure_code. (_gpgme_sign_status_handler): Parse that code and act upon it on EOF. * src/verify.c (op_data_t): Add field failure_code. (_gpgme_verify_status_handler): Parse that code and act upon it on EOF. -- This requires GnuPG 2.1.8 to actually make a difference. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/status-table.c')
-rw-r--r--src/status-table.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/status-table.c b/src/status-table.c
index c85fa951..6d428d71 100644
--- a/src/status-table.c
+++ b/src/status-table.c
@@ -66,6 +66,7 @@ static struct status_table_s status_table[] =
{ "ERRSIG", GPGME_STATUS_ERRSIG },
{ "EXPKEYSIG", GPGME_STATUS_EXPKEYSIG },
{ "EXPSIG", GPGME_STATUS_EXPSIG },
+ { "FAILURE", GPGME_STATUS_FAILURE },
{ "FILE_DONE", GPGME_STATUS_FILE_DONE },
{ "FILE_ERROR", GPGME_STATUS_FILE_ERROR },
{ "FILE_START", GPGME_STATUS_FILE_START },