From adeea8bf2faf08a164289fbf42921ea117ad7422 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 9 May 2008 08:26:28 +0000 Subject: [PATCH] Fixed a gpgconf problem under Windows. --- trunk/gpgme/ChangeLog | 5 +++++ trunk/gpgme/engine-gpgconf.c | 7 +++++-- trunk/gpgme/gpgme.h | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 7c47da8..2111ebb 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2008-05-09 Werner Koch + + * engine-gpgconf.c (gpgconf_read): Do not pass empty lines to the + callback. + 2008-05-07 Werner Koch * engine-gpgconf.c (gpgconf_write): Change argv[0] to a diff --git a/trunk/gpgme/engine-gpgconf.c b/trunk/gpgme/engine-gpgconf.c index ede2c9c..38a293e 100644 --- a/trunk/gpgme/engine-gpgconf.c +++ b/trunk/gpgme/engine-gpgconf.c @@ -247,8 +247,11 @@ gpgconf_read (void *engine, char *arg1, char *arg2, mark--; *mark = '\0'; - /* Got a full line. */ - err = (*cb) (hook, line); + /* Got a full line. Due to the CR removal code (which + occurs only on Windows) we might be one-off and thus + would see empty lines. Don't pass them to the + callback. */ + err = *line? (*cb) (hook, line) : NULL; if (err) goto leave; } diff --git a/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 7bd8aae..ec498c0 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/gpgme/gpgme.h @@ -72,7 +72,7 @@ extern "C" { AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.7-svn1311" +#define GPGME_VERSION "1.1.7-svn1312" -- 2.26.2