From 40520da87bbe88ebbd62592c9e548a6dd1b9abe3 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 6 Oct 2003 19:12:50 +0000 Subject: [PATCH] 2003-10-06 Marcus Brinkmann * engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible error. --- trunk/gpgme/ChangeLog | 3 +++ trunk/gpgme/engine-gpgsm.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index d2b82bd..5c51973 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,5 +1,8 @@ 2003-10-06 Marcus Brinkmann + * engine-gpgsm.c (map_assuan_error): If ERR is -1, return sensible + error. + * io.h (_gpgme_io_subsystem_init): New prototype. * posix-io.c (_gpgme_io_subsystem_init): Add function. (_gpgme_io_spawn): Do not fixup signal handler here. diff --git a/trunk/gpgme/engine-gpgsm.c b/trunk/gpgme/engine-gpgsm.c index 270380a..319e626 100644 --- a/trunk/gpgme/engine-gpgsm.c +++ b/trunk/gpgme/engine-gpgsm.c @@ -152,6 +152,9 @@ close_notify_handler (int fd, void *opaque) static gpgme_error_t map_assuan_error (AssuanError err) { + if (err == -1) + return gpg_error (GPG_ERR_GENERAL); + /* New code will use gpg_error_t values. */ if (gpg_err_source (err)) return (gpgme_error_t) err; -- 2.26.2