From e65bb3ef3ce751eafde54c4cea0815c1e7dd8d24 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Thu, 10 Jan 2008 02:31:15 +0000 Subject: [PATCH] 2008-01-10 Marcus Brinkmann * engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag NO_ARG_DESC. --- gpgme/ChangeLog | 5 +++++ gpgme/engine-gpgconf.c | 20 +++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index ea6a9a0..9f5bbe6 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2008-01-10 Marcus Brinkmann + + * engine-gpgconf.c (gpgconf_config_load_cb2): Handle the flag + NO_ARG_DESC. + 2008-01-04 Marcus Brinkmann * Makefile.am (gpgconf_components): New variable. diff --git a/gpgme/engine-gpgconf.c b/gpgme/engine-gpgconf.c index ee545f8..d562fda 100644 --- a/gpgme/engine-gpgconf.c +++ b/gpgme/engine-gpgconf.c @@ -1,9 +1,6 @@ -// Check protocol. -// IMPLEMENT NO_ARG_DESC!!!! - /* engine-gpgconf.c - gpg-conf engine. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 g10 Code GmbH This file is part of GPGME. @@ -457,9 +454,18 @@ gpgconf_config_load_cb2 (void *hook, char *line) return gpg_error_from_syserror (); } - err = gpgconf_parse_option (opt, &opt->no_arg_value, field[8]); - if (err) - return err; + if (opt->flags & GPGME_CONF_NO_ARG_DESC) + { + opt->no_arg_description = strdup (field[8]); + if (!opt->no_arg_description) + return gpg_error_from_syserror (); + } + else + { + err = gpgconf_parse_option (opt, &opt->no_arg_value, field[8]); + if (err) + return err; + } err = gpgconf_parse_option (opt, &opt->value, field[9]); if (err) -- 2.26.2