aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-05-21 08:22:57 +0000
committerWerner Koch <[email protected]>2016-05-21 08:31:20 +0000
commitdac2c5441d418536632f014c8b0e1359580279d1 (patch)
tree69cc2a97cb78fa8b44df5a79e36b4a6a0c64b9f3 /src/gpgme.c
parentcore: New functions to help parsing of status lines. (diff)
downloadgpgme-dac2c5441d418536632f014c8b0e1359580279d1.tar.gz
gpgme-dac2c5441d418536632f014c8b0e1359580279d1.zip
api: Add new context flag "raw-description".
* src/context.h (struct gpgme_context): Add field raw_description. * src/gpgme.c (gpgme_set_ctx_flag): New flag. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpgme.c b/src/gpgme.c
index 3289be9d..e0cd9b05 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -93,11 +93,20 @@ gpgme_set_global_flag (const char *name, const char *value)
gpgme_error_t
gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value)
{
+ int abool;
+
if (!ctx || !name || !value)
return gpg_error (GPG_ERR_INV_VALUE);
- else if (!strcmp (name, "full-status"))
+
+ abool = *value? !!atoi (value) : 0;
+
+ if (!strcmp (name, "full-status"))
+ {
+ ctx->full_status = abool;
+ }
+ else if (!strcmp (name, "raw-description"))
{
- ctx->full_status = *value? !!atoi (value) : 0;
+ ctx->raw_description = abool;
}
else
return gpg_error (GPG_ERR_UNKNOWN_NAME);